---
updatedAt: 2026-08-12T01:17:13.000Z
agentTools:
  projectIndex: https://developers.activecampaign.com/llms.txt
---

# Update a form

Saves changes to a form. Keys left out keep their stored value.

`actiondata`, `submitdata`, `style`, `options` and `cfields` are each stored whole, so sending part of one removes the rest of it. To change one setting, read the form with `GET /forms/{id}`, change the setting and send that whole object back. `options.paused` is the exception: it keeps its stored value whatever is sent, and only `PUT /forms/{id}/pause` and `PUT /forms/{id}/resume` change it. `options.preferenceCenterType` keeps its stored value too: a form's type is set when it is created. On an `ipad` form, sending `options.sendoptin` as `true` keeps the stored options and ignores the rest of what is sent.

Unsafe HTML is filtered out of `name`, `body`, `thanks` and `html` elements in `cfields`, whatever `submit` says. A `subscribe-to-list` action whose list no longer exists is dropped.

Saving also requests a new screenshot of the form. When its `subscribe-to-list` actions change, the list associations of the automations that start when the form is submitted are rebuilt.

Requires the permission to edit forms.

```json PUT /forms/:id (REQUEST Example)
{
  "form": {
    "name": "Form updated",
    "action": "",
    "actiondata": {
      "actions": [
        {
          "title": "Subscribe to a list",
          "type": "subscribe-to-list",
          "id": "df6ce7f4-c6de-42d9-a796-000d40bcf099",
          "listName": "Generall list",
          "list": "1"
        },
        {
          "title": "Subscribe to an SMS list",
          "type": "subscribe-to-sms-list",
          "sms_consent": true,
          "id": "bb7a4592-0265-4dfb-9810-a9a8f987c64f",
          "listName": "Master SMS List",
          "list": "7"
        },
        {
          "title": "Add a tag",
          "type": "add-a-tag",
          "tag": "Welcome",
          "id": "103b53ef-b234-4052-b342-a45d2f42259c"
        },
        {
          "title": "Add to a deal",
          "type": "add-to-deal",
          "id": "2d2ba5e7-2983-4161-8234-76b547767405",
          "pipeline": "1",
          "dealGroupTitle": "First Pipline",
          "email": "Enter an email address",
          "dealcurrency": "usd",
          "dealvalue": 0,
          "dealtitle": "New deal from form ",
          "stage": "2",
          "dealStageTitle": "In Contact"
        },
        {
          "title": "Email results",
          "type": "email-results",
          "email": "test@activecampaign.com",
          "subject": "Form submission results",
          "fromemail": "test@activecampaign.com",
          "fromname": "John Doe",
          "id": "b48080d2-732a-4865-bed5-72b37d88f442"
        }
      ]
    },
    "submit": "show-thank-you",
    "submitdata": {},
    "url": "",
    "layout": "inline-form",
    "title": "",
    "body": "",
    "button": "Submit",
    "thanks": "Thanks for signing up!",
    "style": {
      "ac_branding": true,
      "background": "FFFFFF",
      "border": {
        "color": "B0B0B0",
        "radius": 0,
        "style": "solid",
        "width": 0
      },
      "button": {
        "background": "004CFF",
        "border": {
          "color": "333333",
          "radius": 4,
          "style": "solid",
          "width": 0
        },
        "fontcolor": "FFFFFF",
        "padding": 10
      },
      "dark": true,
      "fontFamily": "\"IBM Plex Sans\", Helvetica, sans-serif",
      "fontcolor": "000000",
      "layout": "normal",
      "padding": {
        "bottom": 20,
        "left": 20,
        "right": 20,
        "top": 20
      },
      "width": 500
    },
    "options": {
      "blanks_overwrite": true,
      "confaction": "show-message",
      "sendoptin": true,
      "confform": "50",
      "optin_created": true,
      "optin_id": 108,
      "useBgColor": true,
      "useBgImage": false
    },
    "cfields": [
      {
        "type": "header",
        "header": "Subscribe for Email Updates",
        "class": "_x19620520"
      },
      {
        "type": "html",
        "html": "<p>Add a descriptive message telling what your visitor is signing up for here.</p>",
        "header": "undefined",
        "class": "_x90115161"
      },
      {
        "type": "fullname",
        "header": "Full Name",
        "default_text": "Type your name",
        "class": "_x21466802"
      },
      {
        "id": "email",
        "type": "email",
        "header": "Email",
        "default_text": "Type your email",
        "required": true,
        "class": "_x32875615"
      },
      {
        "header": "Phone",
        "default_text": "Type your phone number",
        "consent_message": "By submitting this form and signing up for texts, you consent to receive marketing text messages (e.g. promos, cart reminders) from [Your Company Name] at the number provided. Consent is not a condition of purchase. Msg & data rates may apply. Msg frequency varies. Unsubscribe at any time by replying STOP.",
        "id": "phone",
        "type": "phone",
        "required": true,
        "sms_consent": true,
        "request_confirmation": true,
        "phone_prefix": "IE",
        "phone_validation": true,
        "class": "_x64021393"
      },
      {
        "type": "image",
        "multiple": true,
        "reactField": true,
        "class": "_x25795271"
      }
    ],
    "parentformid": 0,
    "cdate": "2025-06-17T13:14:46.000Z",
    "screenshot": null,
    "defaultscreenshot": null,
    "sitescreenshot": null,
    "entries": 0,
    "contacts": null,
    "deals": null,
    "address": null
  }
}
```
```Text PUT /forms/:id (Example Response)
{
  "form": {
    "name": "Form Updated",
    "action": "",
    "actiondata": {
      "actions": [
        {
          "title": "Subscribe to a list",
          "type": "subscribe-to-list",
          "id": "df6ce7f4-c6de-42d9-a796-000d40bcf099",
          "listName": "Generall List",
          "list": "1"
        },
        {
          "title": "Subscribe to an SMS list",
          "type": "subscribe-to-sms-list",
          "sms_consent": true,
          "id": "bb7a4592-0265-4dfb-9810-a9a8f987c64f",
          "listName": "Master SMS List",
          "list": "7"
        },
        {
          "title": "Add a tag",
          "type": "add-a-tag",
          "tag": "Welcome",
          "id": "103b53ef-b234-4052-b342-a45d2f42259c"
        },
        {
          "title": "Add to a deal",
          "type": "add-to-deal",
          "id": "2d2ba5e7-2983-4161-8234-76b547767405",
          "pipeline": "1",
          "dealGroupTitle": "First Pipline",
          "email": "Enter an email address",
          "dealcurrency": "usd",
          "dealvalue": 0,
          "dealtitle": "New deal from form ",
          "stage": "2",
          "dealStageTitle": "In Contact"
        },
        {
          "title": "Email results",
          "type": "email-results",
          "email": "test@activecampaign.com",
          "subject": "Form submission results",
          "fromemail": "test@activecampaign.com",
          "fromname": "John Doe",
          "id": "b48080d2-732a-4865-bed5-72b37d88f442"
        }
      ]
    },
    "submit": "show-thank-you",
    "submitdata": {},
    "url": "",
    "layout": "inline-form",
    "title": "",
    "body": "",
    "button": "Submit",
    "thanks": "Thanks for signing up!",
    "style": {
      "ac_branding": true,
      "background": "FFFFFF",
      "border": {
        "color": "B0B0B0",
        "radius": 0,
        "style": "solid",
        "width": 0
      },
      "button": {
        "background": "004CFF",
        "border": {
          "color": "333333",
          "radius": 4,
          "style": "solid",
          "width": 0
        },
        "fontcolor": "FFFFFF",
        "padding": 10
      },
      "dark": true,
      "fontFamily": "\"IBM Plex Sans\", Helvetica, sans-serif",
      "fontcolor": "000000",
      "layout": "normal",
      "padding": {
        "bottom": 20,
        "left": 20,
        "right": 20,
        "top": 20
      },
      "width": 500
    },
    "options": {
      "blanks_overwrite": true,
      "confaction": "show-message",
      "sendoptin": true,
      "confform": "50",
      "optin_created": true,
      "optin_id": 108,
      "useBgColor": true,
      "useBgImage": false
    },
    "cfields": [
      {
        "type": "header",
        "header": "Subscribe for Email Updates",
        "class": "_x19620520"
      },
      {
        "type": "html",
        "html": "<p>Add a descriptive message telling what your visitor is signing up for here.</p>",
        "header": "undefined",
        "class": "_x90115161"
      },
      {
        "type": "fullname",
        "header": "Full Name",
        "default_text": "Type your name",
        "class": "_x21466802"
      },
      {
        "id": "email",
        "type": "email",
        "header": "Email",
        "default_text": "Type your email",
        "required": true,
        "class": "_x32875615"
      },
      {
        "header": "Phone",
        "default_text": "Type your phone number",
        "consent_message": "By submitting this form and signing up for texts, you consent to receive marketing text messages (e.g. promos, cart reminders) from [Your Company Name] at the number provided. Consent is not a condition of purchase. Msg & data rates may apply. Msg frequency varies. Unsubscribe at any time by replying STOP.",
        "id": "phone",
        "type": "phone",
        "required": true,
        "sms_consent": true,
        "request_confirmation": true,
        "phone_prefix": "IE",
        "phone_validation": true,
        "class": "_x64021393"
      },
      {
        "type": "image",
        "multiple": true,
        "reactField": true,
        "class": "_x25795271"
      }
    ],
    "parentformid": 0,
    "userid": "1",
    "addressid": 0,
    "cdate": "2025-06-17T08:14:46-05:00",
    "udate": "2025-06-18T00:36:22-05:00",
    "links": {
      "address": "https://test.activehosted.com/api/3/forms/49/address"
    },
    "id": "49",
    "address": null
  }
}
```

# OpenAPI definition

```json
{
  "openapi": "3.1.0",
  "info": {
    "title": "v3",
    "version": "3"
  },
  "servers": [
    {
      "url": "https://{youraccountname}.api-us1.com/api/3",
      "variables": {
        "youraccountname": {
          "default": "youraccountname"
        }
      }
    }
  ],
  "components": {
    "securitySchemes": {
      "sec0": {
        "type": "apiKey",
        "name": "Api-Token",
        "in": "header",
        "x-default": ""
      }
    },
    "schemas": {
      "Form": {
        "description": "A form. Numbers read from the database, such as IDs, are returned as strings.",
        "properties": {
          "id": {
            "description": "ID of the form",
            "type": "string",
            "example": "13"
          },
          "name": {
            "description": "Name of the form",
            "type": "string",
            "example": "Newsletter signup"
          },
          "layout": {
            "description": "How the form is shown",
            "type": "string",
            "enum": [
              "inline-form",
              "floating-box",
              "floating-bar",
              "modal",
              "preference-center",
              "chat",
              "ipad"
            ],
            "example": "inline-form"
          },
          "public_url": {
            "description": "The form's public link, on the account's custom domain when one is set. Read only. Left out of the `POST /forms` and `PUT /forms/{id}` responses.",
            "type": "string",
            "example": "https://example.activehosted.com/f/13"
          },
          "embed_code": {
            "description": "HTML snippet that places the form on a website. Inline and Preference Center forms render into the `<div>` placeholder; other layouts load from the script alone. Show it as text to copy, do not render it. Read only. Left out of the `POST /forms` and `PUT /forms/{id}` responses.",
            "type": "string",
            "example": "<div class=\"_form_13\"></div><script src=\"https://example.activehosted.com/f/embed.php?id=13\" charset=\"utf-8\"></script>"
          },
          "actiondata": {
            "description": "What the form does when it is submitted. `{}` when it has no actions.",
            "properties": {
              "actions": {
                "description": "The actions",
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/FormAction"
                }
              }
            },
            "type": "object"
          },
          "submit": {
            "description": "What visitors see after submitting: `show-thank-you` shows `thanks`, and `open-url` opens `submitdata.url`. Preference Centers use `show-confirmation-message`, which shows `options.preferencesConfirmed`. Empty when it is not set.",
            "type": "string",
            "example": "show-thank-you"
          },
          "submitdata": {
            "description": "Settings for `submit`",
            "properties": {
              "url": {
                "description": "Address opened after submitting, when `submit` is `open-url`. It is not the form's public link.",
                "type": [
                  "string",
                  "null"
                ],
                "example": "https://example.com/thanks"
              }
            },
            "type": "object"
          },
          "thanks": {
            "description": "Message shown after submitting, when `submit` is `show-thank-you`",
            "type": [
              "string",
              "null"
            ],
            "example": "Thanks for signing up!"
          },
          "url": {
            "description": "Website the form builder shows behind the form as a preview. It is not the form's public link (see `public_url`) and is often empty.",
            "type": [
              "string",
              "null"
            ],
            "example": ""
          },
          "button": {
            "description": "Text of the submit button",
            "type": [
              "string",
              "null"
            ],
            "example": "Submit"
          },
          "title": {
            "description": "Heading of an older pop-up form. Newer forms use a `header` element in `cfields`.",
            "type": [
              "string",
              "null"
            ],
            "example": null
          },
          "body": {
            "description": "Text of an older pop-up form. Newer forms use an `html` element in `cfields`.",
            "type": [
              "string",
              "null"
            ],
            "example": null
          },
          "style": {
            "$ref": "#/components/schemas/FormStyle",
            "description": "How the form looks. `{}` when nothing is set."
          },
          "options": {
            "$ref": "#/components/schemas/FormOptions",
            "description": "The form's settings"
          },
          "cfields": {
            "description": "The form's inputs and content, in display order. With none it comes back as `[]` or `{}`, depending on how the form was saved.",
            "oneOf": [
              {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/FormField"
                }
              },
              {
                "maxProperties": 0,
                "type": "object"
              }
            ]
          },
          "parentformid": {
            "description": "ID of the form this one is the opt-in confirmation page of. `0` on any other form.",
            "type": "string",
            "example": "0"
          },
          "userid": {
            "description": "ID of the user who created the form",
            "type": "string",
            "example": "1"
          },
          "addressid": {
            "description": "ID of the address related to the form. `0` when it has none.",
            "type": "string",
            "example": "0"
          },
          "cdate": {
            "description": "When the form was created",
            "type": [
              "string",
              "null"
            ],
            "example": "2026-10-07T09:12:46-06:00"
          },
          "udate": {
            "description": "When the form was last saved",
            "type": [
              "string",
              "null"
            ],
            "example": "2026-10-12T11:18:52-06:00"
          },
          "source": {
            "description": "Where the form was made",
            "type": "string",
            "example": "builder"
          },
          "entries": {
            "description": "Number of times the form has been submitted. Left out of the `POST /forms` and `PUT /forms/{id}` responses.",
            "type": [
              "string",
              "integer"
            ],
            "example": "0"
          },
          "aid": {
            "description": "ID of the address on the form's opt-in email campaign. Null when the form has no campaign. Left out of the `POST /forms` and `PUT /forms/{id}` responses.",
            "type": [
              "string",
              "integer",
              "null"
            ],
            "example": null
          },
          "action": {
            "description": "Not used",
            "type": "string",
            "example": ""
          },
          "links": {
            "description": "Addresses of related records",
            "properties": {
              "address": {
                "description": "Address that returns the form's related address",
                "type": "string",
                "example": "https://:account.api-us1.com/api/3/forms/13/address"
              }
            },
            "type": "object"
          },
          "address": {
            "description": "ID of the related address. Null when the form has none.",
            "type": [
              "string",
              "null"
            ],
            "example": null
          },
          "defaultscreenshot": {
            "description": "`GET /forms` only: address of the placeholder image for a form with no screenshot",
            "type": "string",
            "example": "//img-us1.com/default-form.gif"
          },
          "screenshot": {
            "description": "`GET /forms` only: address of the form's screenshot. Left out when it has none.",
            "type": "string",
            "example": "https://example.com/screenshots/13.png"
          },
          "recent": {
            "description": "`GET /forms` only: IDs of the contacts who most recently submitted the form, at most 4",
            "type": "array",
            "items": {
              "type": [
                "string",
                "integer"
              ]
            },
            "example": [
              "5",
              "3"
            ]
          },
          "contacts": {
            "description": "`GET /forms` only: number of contacts the form has collected",
            "type": "integer",
            "example": 2
          },
          "deals": {
            "description": "`GET /forms` only: number of deals the form has created",
            "type": "integer",
            "example": 0
          },
          "labelsData": {
            "description": "`GET /forms` only, with `include_folder=1`: the form's folders (form labels)",
            "type": "array",
            "items": {
              "type": "object"
            }
          }
        },
        "type": "object"
      },
      "FormAction": {
        "description": "Something the form does when it is submitted. Which keys apply depends on `type`; other keys are kept as sent.",
        "required": [
          "type"
        ],
        "properties": {
          "type": {
            "description": "What the action does",
            "type": "string",
            "enum": [
              "subscribe-to-list",
              "subscribe-to-sms-list",
              "add-a-tag",
              "add-to-deal",
              "email-results",
              "manage-preferences"
            ],
            "example": "subscribe-to-list"
          },
          "id": {
            "description": "ID the form builder gives the action",
            "type": "string",
            "example": "df6ce7f4-c6de-42d9-a796-000d40bcf099"
          },
          "title": {
            "description": "Label the form builder shows for the action",
            "type": "string",
            "example": "Subscribe to a list"
          },
          "list": {
            "description": "For `subscribe-to-list` and `subscribe-to-sms-list`: ID of the list. `PUT /forms/{id}` drops a `subscribe-to-list` action whose list no longer exists.",
            "type": [
              "string",
              "integer"
            ],
            "example": "1"
          },
          "listName": {
            "description": "For `subscribe-to-list` and `subscribe-to-sms-list`: name of the list, for display",
            "type": "string",
            "example": "Newsletter"
          },
          "sms_consent": {
            "description": "For `subscribe-to-sms-list`: whether the form collects SMS consent",
            "type": "boolean",
            "example": true
          },
          "tag": {
            "description": "For `add-a-tag`: the tag to add to the contact",
            "type": "string",
            "example": "newsletter"
          },
          "pipeline": {
            "description": "For `add-to-deal`: ID of the pipeline",
            "type": [
              "string",
              "integer"
            ],
            "example": "1"
          },
          "stage": {
            "description": "For `add-to-deal`: ID of the stage",
            "type": [
              "string",
              "integer"
            ],
            "example": "1"
          },
          "dealtitle": {
            "description": "For `add-to-deal`: title of the deal",
            "type": "string",
            "example": "Website lead"
          },
          "dealvalue": {
            "description": "For `add-to-deal`: value of the deal, in whole currency units",
            "type": [
              "string",
              "integer"
            ],
            "example": "100"
          },
          "dealcurrency": {
            "description": "For `add-to-deal`: currency of the deal",
            "type": "string",
            "example": "usd"
          },
          "dealowner": {
            "description": "For `add-to-deal`: ID of the user who owns the deal",
            "type": [
              "string",
              "integer"
            ],
            "example": "1"
          },
          "email": {
            "description": "For `email-results`: address the results are sent to",
            "type": "string",
            "example": "johndoe@example.com"
          },
          "fromname": {
            "description": "For `email-results`: sender name of the email",
            "type": "string",
            "example": "John Doe"
          },
          "fromemail": {
            "description": "For `email-results`: sender address of the email",
            "type": "string",
            "example": "johndoe@example.com"
          },
          "subject": {
            "description": "For `email-results`: subject of the email",
            "type": "string",
            "example": "Form submission results"
          },
          "fields": {
            "description": "For `email-results`: which contact fields the email lists. `form` lists only the custom fields on this form that have a value, plus email, name, phone and subscribed date; `all` (the default, also used when the key is missing or unknown) lists every field.",
            "type": "string",
            "enum": [
              "form",
              "all"
            ],
            "example": "form"
          }
        },
        "type": "object"
      },
      "FormField": {
        "description": "One element of the form, in display order: an input, a heading or a block of content. Keys other than these are kept as sent; the form builder stores more for some types.",
        "properties": {
          "type": {
            "description": "What the element is. Among others: `email`, `emailidentifier`, `fullname`, `firstname`, `lastname`, `phone`, `header`, `html`, `image`, `listsubscriptions`, `subscriptionmessage`, and the input types of custom fields, such as `text`, `textarea` and `checkbox`. An input for a custom field can leave it out, with `id` saying which field.",
            "type": "string",
            "example": "email"
          },
          "id": {
            "description": "What the input fills in: the ID of a custom field, or the name of a standard one, such as `email`",
            "type": [
              "string",
              "integer"
            ],
            "example": "email"
          },
          "header": {
            "description": "Label of the input, or the text of a `header` element",
            "type": "string",
            "example": "Email"
          },
          "default_text": {
            "description": "Placeholder shown in the input",
            "type": "string",
            "example": "Type your email"
          },
          "required": {
            "description": "Whether a submission must fill in this input.",
            "type": "boolean",
            "example": true
          },
          "html": {
            "description": "For `html` elements: the content. Unsafe HTML is filtered out by `POST /forms` and `PUT /forms/{id}`.",
            "type": "string",
            "example": "<p>Sign up for updates.</p>"
          },
          "class": {
            "description": "CSS class the form builder gives the element",
            "type": "string",
            "example": "_x29498744"
          },
          "required_options": {
            "description": "For inputs with options: the options that must be chosen, as an object keyed by option ID. Empty when there are none.",
            "type": "object"
          }
        },
        "type": "object"
      },
      "FormNotFoundResponse": {
        "description": "The body when no form has the ID",
        "properties": {
          "message": {
            "description": "Names the missing form",
            "type": "string",
            "example": "No Result found for Form with id 42"
          }
        },
        "type": "object"
      },
      "FormOptions": {
        "description": "The form's settings. Every key is optional, and keys other than these are kept as sent. The object is stored whole: an update that sends `options` replaces all of them, except `paused` and `preferenceCenterType`, which keep their stored values.",
        "properties": {
          "blanks_overwrite": {
            "description": "Whether a blank input in a submission overwrites what is stored on the contact. When `false`, blank inputs are ignored.",
            "type": "boolean",
            "example": true
          },
          "sendoptin": {
            "description": "Whether the form sends an opt-in confirmation email to contacts it subscribes to a list. The email is created with `POST /form/optin`, must contain `%CONFIRMLINK%`, and is only sent once its ID is saved in `optin_id`.",
            "type": "boolean",
            "example": true
          },
          "optin_id": {
            "description": "ID of the campaign holding the form's opt-in confirmation email. Save it with `PUT /forms/{id}` after `POST /form/optin`, or the form won't send the email. Responses fill it in as a number once the campaign exists, whether or not it is saved, so don't take it there as proof that it is.",
            "type": [
              "integer",
              "string"
            ],
            "example": 12
          },
          "optin_created": {
            "description": "Whether the opt-in confirmation email has been set up. Absent until the email is created. Responses work it out from the campaign, whatever is saved.",
            "type": "boolean",
            "example": true
          },
          "confaction": {
            "description": "What happens after a contact clicks the link in the opt-in confirmation email: `show-message` shows the form in `confform`, and `redirect` opens `confurl`",
            "type": "string",
            "enum": [
              "show-message",
              "redirect",
              ""
            ],
            "example": "show-message"
          },
          "confform": {
            "description": "ID of the form that shows the confirmation message, used when `confaction` is `show-message`",
            "type": [
              "string",
              "integer",
              "null"
            ],
            "example": "14"
          },
          "confurl": {
            "description": "Address opened after confirming, used when `confaction` is `redirect`",
            "type": "string",
            "example": "https://example.com/confirmed"
          },
          "preferenceCenterType": {
            "description": "The kind of preference center the form is. Only `open-tracking` exists: a preference center without lists that manages only the open tracking opt-out. It is set when the form is created, needs the open tracking preference center feature flag, and is kept as stored on every update: any value sent to `PUT /forms/{id}` is ignored. Missing on every other form.",
            "type": "string",
            "enum": [
              "open-tracking"
            ],
            "example": "open-tracking"
          },
          "paused": {
            "description": "Whether the form is paused: it accepts no submissions and shows visitors a paused message in place of its fields. Missing when the form has never been paused. Only `PUT /forms/{id}/pause` and `PUT /forms/{id}/resume` change it; any value sent to `POST /forms` or `PUT /forms/{id}` is ignored.",
            "type": "boolean",
            "example": false
          },
          "paused_message": {
            "description": "The message a paused form shows visitors. Missing or empty: a default message. Saving trims it, and returns `422` when it is too long.",
            "type": "string",
            "example": "Sign-ups are closed for now."
          },
          "paused_link_text": {
            "description": "Text of the button a paused form shows under its message. Send it with `paused_link_url`: saving one without the other returns `422`.",
            "type": "string",
            "example": "Visit our site"
          },
          "paused_link_url": {
            "description": "The http(s) address the paused form's button opens. Saving adds `https://` to an address without one, and returns `422` for anything else that isn't a web address.",
            "type": "string",
            "example": "https://example.com"
          },
          "blocked_email_domains": {
            "description": "Email domains the form refuses submissions from, lowercase and at most 100. `example.com` blocks addresses at example.com only; `*.example.com` blocks every subdomain of example.com but not example.com itself.",
            "type": "array",
            "items": {
              "type": "string"
            },
            "example": [
              "competitor.com",
              "*.example.com"
            ]
          },
          "block_personal_email_providers": {
            "description": "Whether the form refuses addresses from personal email providers, such as gmail.com and yahoo.com",
            "type": "boolean",
            "example": false
          },
          "sms_doi_enabled": {
            "description": "Whether a form that subscribes contacts to an SMS list asks them to confirm by SMS",
            "type": "boolean",
            "example": false
          },
          "sms_confirmation_message": {
            "description": "The SMS that asks a contact to confirm",
            "type": "string",
            "example": "Reply 1 to confirm your subscription."
          },
          "sms_doi_success_message": {
            "description": "The SMS sent once a contact confirms",
            "type": "string",
            "example": "You are subscribed."
          },
          "sms_doi_address_id": {
            "description": "ID of the address the confirmation SMS is sent with",
            "type": [
              "integer",
              "null"
            ],
            "example": 2
          },
          "fields": {
            "description": "Pop-up layouts only: which inputs an older form shows, such as `name`, `email`, `email_required`, `phone` and `phone_required`. Newer forms keep their inputs in `cfields`.",
            "type": "object",
            "example": {
              "name": false
            }
          },
          "position": {
            "description": "Pop-up layouts only: where the form appears, such as `top`, `bottom`, `left` or `right`",
            "type": "string",
            "example": "top"
          },
          "initial_effect": {
            "description": "Pop-up layouts only: how the form appears, such as `fade`, `slide-in` or `none`",
            "type": "string",
            "example": "fade"
          },
          "show_delay": {
            "description": "Pop-up layouts only: when the form appears. `scroll` waits until the visitor has scrolled to `delay_position`.",
            "type": "string",
            "example": "scroll"
          },
          "delay_position": {
            "description": "Pop-up layouts only: how far down the page, as a percentage, the visitor scrolls before the form appears, when `show_delay` is `scroll`",
            "type": [
              "string",
              "integer"
            ],
            "example": "50"
          },
          "hide": {
            "description": "Pop-up layouts only: when a visitor stops seeing the form. `always` keeps showing it, `once` shows it once, and `interaction` stops after they interact with it.",
            "type": [
              "string",
              "null"
            ],
            "enum": [
              "always",
              "once",
              "interaction",
              null
            ],
            "example": "once"
          },
          "hide_days": {
            "description": "Pop-up layouts only: how many days until a hidden form shows again. Not used when `hide` is `always`.",
            "type": [
              "string",
              "integer"
            ],
            "example": 7
          },
          "preferencesConfirmed": {
            "description": "Preference Centers only: what contacts see after saving their preferences, as `header` and `detail`",
            "type": "object",
            "example": {
              "header": "Preferences saved",
              "detail": "Thanks for letting us know."
            }
          },
          "useBgColor": {
            "description": "Form builder setting: whether the form uses its background color. `GET /forms/{id}` answers `true` when none is stored.",
            "type": "boolean",
            "example": true
          },
          "useBgImage": {
            "description": "Form builder setting: whether the form uses a background image. `GET /forms/{id}` answers `false` when none is stored.",
            "type": "boolean",
            "example": false
          }
        },
        "type": "object"
      },
      "FormRequest": {
        "description": "A form to save, under form",
        "required": [
          "form"
        ],
        "properties": {
          "form": {
            "$ref": "#/components/schemas/FormWrite",
            "description": "The form"
          }
        },
        "type": "object"
      },
      "FormResponse": {
        "description": "A form, under form",
        "properties": {
          "form": {
            "$ref": "#/components/schemas/Form",
            "description": "The form"
          }
        },
        "type": "object"
      },
      "FormStyle": {
        "description": "How the form looks. Every key is optional, and keys other than these are kept as sent; the form builder stores more for some layouts. A color is a hex value without the `#`, or an object of `r`, `g`, `b` and `a`. The object is stored whole: an update that sends `style` replaces all of it.",
        "properties": {
          "background": {
            "description": "Background color of the form",
            "type": [
              "string",
              "object"
            ],
            "example": "FFFFFF"
          },
          "fontcolor": {
            "description": "Text color of the form",
            "type": [
              "string",
              "object"
            ],
            "example": "000000"
          },
          "fontFamily": {
            "description": "Font family of the form",
            "type": "string",
            "example": "Arial"
          },
          "layout": {
            "description": "How labels and inputs are arranged",
            "type": "string",
            "enum": [
              "normal",
              "inline",
              "top",
              "left",
              "middle"
            ],
            "example": "normal"
          },
          "width": {
            "description": "Width of the form, in pixels",
            "type": "integer",
            "example": 500
          },
          "ac_branding": {
            "description": "Whether the form shows the ActiveCampaign branding badge",
            "type": "boolean",
            "example": true
          },
          "border": {
            "description": "Border of the form: `width`, `style`, `color` and `radius`, or `top`, `right`, `bottom` and `left` with their own `width`, `style` and `color`, plus `radius`",
            "type": "object",
            "example": {
              "width": 0,
              "style": "solid",
              "color": "B0B0B0",
              "radius": 0
            }
          },
          "button": {
            "description": "Style of the submit button: `padding`, `background`, `fontcolor` and `border`",
            "type": "object",
            "example": {
              "padding": 10,
              "background": "333333",
              "fontcolor": "FFFFFF"
            }
          },
          "customcss": {
            "description": "Custom CSS added to the form",
            "type": [
              "string",
              "null"
            ],
            "example": ""
          },
          "padding": {
            "description": "Space inside the form, in pixels: one number, or `top`, `right`, `bottom` and `left`",
            "type": [
              "integer",
              "object"
            ],
            "example": 20
          },
          "inputs": {
            "description": "Style of the inputs, such as `background`, `fontcolor` and `borderRadius`",
            "type": "object",
            "example": {
              "background": "FFFFFF",
              "fontcolor": "5D5D5D",
              "borderRadius": 4
            }
          },
          "fonts": {
            "description": "Fonts of the form, by the text they apply to, such as `headings`",
            "type": "object"
          },
          "pageBackground": {
            "description": "Background color of the page around the form on its public link, as an object of `r`, `g`, `b` and `a`",
            "type": "object",
            "example": {
              "r": 255,
              "g": 255,
              "b": 255,
              "a": 1
            }
          },
          "borderRadius": {
            "description": "Pop-up layouts: corner radius of the form, in pixels",
            "type": "integer",
            "example": 4
          },
          "boxShadow": {
            "description": "Pop-up layouts: size of the form's shadow",
            "type": "string",
            "example": "medium"
          },
          "height": {
            "description": "Floating bar layout: height of the form, in pixels",
            "type": "integer",
            "example": 60
          },
          "image": {
            "description": "Older pop-up forms: address of the form's image. Newer forms use an `image` element in `cfields`.",
            "type": "string",
            "example": "https://example.com/banner.png"
          },
          "dark": {
            "description": "Form builder setting",
            "type": "boolean",
            "example": true
          }
        },
        "type": "object"
      },
      "FormWrite": {
        "description": "The form's fields. Any other key is ignored.",
        "properties": {
          "name": {
            "description": "Name of the form. Unsafe HTML in it is filtered out.",
            "type": "string",
            "example": "Newsletter signup"
          },
          "layout": {
            "description": "How the form is shown. Layouts other than `inline-form`, `ipad` and `chat` need a plan with modal forms, and `preference-center` needs a plan with Preference Centers. Send it on every request: `POST /forms` can refuse a form without one, and `PUT /forms/{id}` without one keeps the stored layout but adds `fields` to `options`.",
            "type": "string",
            "enum": [
              "inline-form",
              "floating-box",
              "floating-bar",
              "modal",
              "preference-center",
              "chat",
              "ipad"
            ],
            "example": "inline-form"
          },
          "actiondata": {
            "description": "What the form does when it is submitted. Stored whole: sending it replaces every action.",
            "properties": {
              "actions": {
                "description": "The actions",
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/FormAction"
                }
              }
            },
            "type": "object"
          },
          "submit": {
            "description": "What visitors see after submitting: `show-thank-you` shows `thanks`, and `open-url` opens `submitdata.url`. Preference Centers use `show-confirmation-message`, which shows `options.preferencesConfirmed`.",
            "type": "string",
            "example": "show-thank-you"
          },
          "submitdata": {
            "description": "Settings for `submit`. Stored whole.",
            "properties": {
              "url": {
                "description": "Address opened after submitting, when `submit` is `open-url`. `PUT /forms/{id}` trims it and replaces spaces with `%20`.",
                "type": "string",
                "example": "https://example.com/thanks"
              }
            },
            "type": "object"
          },
          "thanks": {
            "description": "Message shown after submitting, when `submit` is `show-thank-you`. `POST /forms` and `PUT /forms/{id}` filter unsafe HTML out of it whenever it is sent.",
            "type": "string",
            "example": "Thanks for signing up!"
          },
          "url": {
            "description": "Website the form builder shows behind the form as a preview. It is not the form's public link.",
            "type": "string",
            "example": "https://example.com"
          },
          "button": {
            "description": "Text of the submit button",
            "type": "string",
            "example": "Submit"
          },
          "title": {
            "description": "Heading of an older pop-up form. Newer forms use a `header` element in `cfields`.",
            "type": "string",
            "example": "Join us"
          },
          "body": {
            "description": "Text of an older pop-up form. Newer forms use an `html` element in `cfields`. `POST /forms` and `PUT /forms/{id}` filter unsafe HTML out of it.",
            "type": "string",
            "example": "Sign up for updates."
          },
          "style": {
            "$ref": "#/components/schemas/FormStyle",
            "description": "How the form looks. Stored whole."
          },
          "options": {
            "$ref": "#/components/schemas/FormOptions",
            "description": "The form's settings. Stored whole: to change one, read the form with `GET /forms/{id}`, change it and send the whole object back. `paused` is ignored."
          },
          "cfields": {
            "description": "The form's inputs and content, in display order. Stored whole: sending it replaces every element. `GET /forms/{id}` returns `{}` for a form with none, and that can be sent back as it is.",
            "oneOf": [
              {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/FormField"
                }
              },
              {
                "maxProperties": 0,
                "type": "object"
              }
            ]
          },
          "parentformid": {
            "description": "ID of the form this one is the opt-in confirmation page of. `0` on any other form.",
            "type": [
              "string",
              "integer"
            ],
            "example": 0
          },
          "addressid": {
            "description": "ID of the address related to the form. `0` when it has none.",
            "type": [
              "string",
              "integer"
            ],
            "example": 0
          },
          "source": {
            "description": "Where the form was made, at most 16 characters. Defaults to `builder`.",
            "type": "string",
            "example": "builder"
          },
          "action": {
            "description": "Not used",
            "type": "string",
            "example": ""
          },
          "aid": {
            "description": "`PUT /forms/{id}` only: ID of the address to set on the form's opt-in email campaign. Not stored on the form.",
            "type": "integer",
            "example": 2
          }
        },
        "type": "object"
      },
      "FormsApiError": {
        "description": "The body of a refused forms request",
        "properties": {
          "errors": {
            "description": "One entry per error",
            "type": "array",
            "items": {
              "properties": {
                "status": {
                  "description": "HTTP status code, the same as the response status. A string or a number, depending on the check that refused the request. Absent when the plan refuses the layout.",
                  "type": [
                    "string",
                    "integer"
                  ],
                  "example": 422
                },
                "title": {
                  "description": "Short name of the error, or the reason when the plan refuses the layout. Absent when the user may not edit forms.",
                  "type": "string",
                  "example": "Invalid attribute"
                },
                "detail": {
                  "description": "What is wrong. Empty when the plan refuses the layout.",
                  "type": "string",
                  "example": "Each blocked email domain must be a valid domain, such as example.com or *.example.com."
                },
                "code": {
                  "description": "Error code. Sent only when the plan refuses the layout.",
                  "type": "string",
                  "example": "field_invalid"
                },
                "source": {
                  "description": "The field at fault. Sent only for an invalid field.",
                  "properties": {
                    "pointer": {
                      "description": "The field, as /data/attributes/ followed by its name: `layout`, a key in `options`, or content that isn't text, such as `thanks` or `cfields.html`",
                      "type": "string",
                      "example": "/data/attributes/blocked_email_domains"
                    }
                  },
                  "type": "object"
                }
              },
              "type": "object"
            }
          }
        },
        "type": "object"
      }
    }
  },
  "security": [
    {
      "sec0": []
    }
  ],
  "paths": {
    "/forms/{id}": {
      "put": {
        "summary": "Update a form",
        "description": "Saves changes to a form. Keys left out keep their stored value.\n\n`actiondata`, `submitdata`, `style`, `options` and `cfields` are each stored whole, so sending part of one removes the rest of it. To change one setting, read the form with `GET /forms/{id}`, change the setting and send that whole object back. `options.paused` is the exception: it keeps its stored value whatever is sent, and only `PUT /forms/{id}/pause` and `PUT /forms/{id}/resume` change it. `options.preferenceCenterType` keeps its stored value too: a form's type is set when it is created. On an `ipad` form, sending `options.sendoptin` as `true` keeps the stored options and ignores the rest of what is sent.\n\nUnsafe HTML is filtered out of `name`, `body`, `thanks` and `html` elements in `cfields`, whatever `submit` says. A `subscribe-to-list` action whose list no longer exists is dropped.\n\nSaving also requests a new screenshot of the form. When its `subscribe-to-list` actions change, the list associations of the automations that start when the form is submitted are rebuilt.\n\nRequires the permission to edit forms.",
        "operationId": "put_forms{id}",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "ID of the form to update",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "requestBody": {
          "description": "The fields to save, under form",
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/FormRequest"
              },
              "examples": {
                "Rename": {
                  "summary": "Rename a form",
                  "value": {
                    "form": {
                      "name": "Newsletter signup",
                      "layout": "inline-form"
                    }
                  }
                },
                "Thank-you message": {
                  "summary": "Change what visitors see after submitting",
                  "value": {
                    "form": {
                      "layout": "inline-form",
                      "submit": "show-thank-you",
                      "thanks": "Thanks for signing up!"
                    }
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The form was saved. The body leaves out `entries`, `aid`, `public_url` and `embed_code`; read them with `GET /forms/{id}`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FormResponse"
                },
                "example": {
                  "form": {
                    "id": "13",
                    "name": "Newsletter signup",
                    "action": "",
                    "actiondata": {
                      "actions": [
                        {
                          "type": "subscribe-to-list",
                          "list": "1",
                          "listName": "Newsletter"
                        }
                      ]
                    },
                    "submit": "show-thank-you",
                    "submitdata": {
                      "url": ""
                    },
                    "url": "",
                    "layout": "inline-form",
                    "title": null,
                    "body": null,
                    "button": "Submit",
                    "thanks": "Thanks for signing up!",
                    "style": {
                      "background": "FFFFFF",
                      "fontcolor": "000000",
                      "layout": "normal",
                      "width": 500,
                      "ac_branding": true
                    },
                    "options": {
                      "blanks_overwrite": true,
                      "confaction": "show-message"
                    },
                    "cfields": [
                      {
                        "type": "email",
                        "id": "email",
                        "header": "Email",
                        "default_text": "Type your email",
                        "required": true
                      }
                    ],
                    "parentformid": "0",
                    "userid": "1",
                    "addressid": "0",
                    "cdate": "2026-10-07T09:12:46-06:00",
                    "udate": "2026-10-12T11:18:52-06:00",
                    "source": "builder",
                    "links": {
                      "address": "https://:account.api-us1.com/api/3/forms/13/address"
                    },
                    "address": null
                  }
                }
              }
            }
          },
          "400": {
            "description": "The body has no `form` object.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FormsApiError"
                },
                "example": {
                  "errors": [
                    {
                      "status": 400,
                      "title": "Bad Request",
                      "detail": "Send the form in a form object."
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "The user may not edit forms, or may not edit this form.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FormsApiError"
                },
                "example": {
                  "errors": [
                    {
                      "status": "403",
                      "detail": "Forbidden"
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "No form has this ID.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FormNotFoundResponse"
                },
                "example": {
                  "message": "No Result found for Form with id 42"
                }
              }
            }
          },
          "422": {
            "description": "The layout is not on the account's plan, or an option is invalid: `blocked_email_domains`, `block_personal_email_providers`, the paused message and button options, or the SMS confirmation messages. A stored open tracking preference center (`options.preferenceCenterType` `open-tracking`) also returns `422` when the layout or the fields it would hold after the save are not `preference-center` and exactly one `opentrackingoptout` among only header, html, image and emailidentifier fields; a key left out counts as its stored value. Also when `name`, `body`, `thanks`, the `html` of an `html` element, or `submitdata.url` while `submit` is `open-url`, is sent as a list or an object rather than text.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FormsApiError"
                },
                "example": {
                  "errors": [
                    {
                      "status": 422,
                      "title": "Invalid attribute",
                      "detail": "A link needs both its text and a web address.",
                      "source": {
                        "pointer": "/data/attributes/paused_link_url"
                      }
                    }
                  ]
                }
              }
            }
          }
        }
      }
    }
  },
  "x-readme": {
    "headers": [],
    "explorer-enabled": false,
    "proxy-enabled": false
  },
  "x-readme-fauxas": true
}
```