---
title: "Forms"
description: "Reference documentation for the Forms endpoints in the Klaviyo REST API."
url: "https://developers.klaviyo.com/en/v2025-10-15/reference/forms"
revision: "2025-10-15"
llmsTxt: "https://developers.klaviyo.com/en/v2025-10-15/reference/forms/llms.txt"
---

# Forms

## Before you begin

Check out our general <a href="https://developers.klaviyo.com/en/reference.md" target="_blank">API overview</a> before getting started with specific endpoints.

Forms allow you to collect information from your site's visitors. You can create new profiles, subscribe them to marketing, assign coupons to shoppers, and more.

## Data model

A form has the following:

- `id`
  The form ID.

- `attributes`

  - `status`

    The current status of the form, e.g., `draft` or `live`.

  - `ab_test`

    Whether or not the form has an A/B test.

  - `created_at`

    The timestamp of when the form was created.

  - `updated_at`

    The timestamp of when the form was last updated.

  - `definition`

    A definition of the form.

    - `versions`

      Different versions of the same form ID. You may have more than one `live` variation, which means that you have an ongoing A/B test. You may also have a combination of `live` and `draft` versions to represent the version that you are actively modifying in the sign-up form builder.

      - `name`

        The variation's name.

      - `type`

        The type of form, i.e., `flyout`, `popup`, `banner`, `full-page`, or `embed`.

      - `triggers`

        A set of conditions that would cause the form to be shown.

      - `teaser`

        A small widget that shoppers can click to open or re-open a form after it's been closed.

      - `location`

        The location where the form will show, e.g., `bottom_left` (available in select forms).

      - `status`

        The current status of the variation, e.g., `draft` or `live`.

      - `ab_test`

        Whether or not the variation is part of an A/B test.

      - `steps`

        All of the steps of a given form variation (in order of how they appear).

        - `columns`

          All of the columns in a given step (in order of how they appear). Forms may only have multiple columns if they also have a side image.

          - `rows`

            All of the rows in a given column (in order of how they appear).

            - `blocks`

              All of the blocks in a given row (in order of how they appear).

              - `action`

                The action associated with a given block.

Any one of these form entities will also have a variety of properties and styling options that allow you to customize in all ways that are supported by the sign-up form editor.

Here's an example of a very simple sign-up form:

```json
{
  "data": {
    "type": "form",
    "attributes": {
      "definition": {
        "versions": [
          {
            "steps": [
              {
                "columns": [
                  {
                    "rows": [
                      {
                        "blocks": [
                          {
                            "type": "html_text",
                            "properties": {
                              "content": "<div>Sign up for our newsletter</div>"
                            }
                          }
                        ]
                      },
                      {
                        "blocks": [
                          {
                            "type": "email",
                            "properties": {
                              "label": "Email",
                              "placeholder": "Enter your email address",
                              "required": true
                            }
                          }
                        ]
                      },
                      {
                        "blocks": [
                          {
                            "type": "button",
                            "properties": {
                              "label": "Email"
                            },
                            "action": {
                              "id": "01JSJ2D930BGX4SHPPNPEFKBY8",
                              "submit": true,
                              "type": "next_step",
                              "properties": {
                                "list_id": "<LIST_ID>"
                              }
                            }
                          }
                        ]
                      }
                    ]
                  }
                ],
                "name": "email sign-up"
              },
              {
                "columns": [
                  {
                    "rows": [
                      {
                        "blocks": [
                          {
                            "type": "html_text",
                            "properties": {
                              "content": "<div>Thank you for subscribing!</div>"
                            }
                          }
                        ]
                      }
                    ]
                  }
                ],
                "name": "success step"
              }
            ],
            "name": "test",
            "type": "popup",
            "status": "draft"
          }
        ]
      },
      "status": "draft",
      "ab_test": false,
      "name": "My first API form"
    }
  }
}
```

## Get a form's definition

`GET /api/forms/{id}`

We've added the ability to retrieve a form's `definition`.

The example response below returns the definition of the form shown above, augmented with some defaults:

```json Response
{
  "data": {
    "type": "form",
    "id": "Ser5Vq",
    "attributes": {
      "status": "draft",
      "ab_test": false,
      "name": "My first API form",
      "definition": {
        "versions": [
          {
            "id": 19258033,
            "steps": [
              {
                "id": "01JTP6F3EERYR2T30C4ZDCS6JA",
                "columns": [
                  {
                    "id": "01JTP6F3EQ9TQ6TEWQSV33JDQ7",
                    "rows": [
                      {
                        "id": "01JTP6F3EZRM5M0HM42NPC6QA5",
                        "blocks": [
                          {
                            "id": "01JTP6F3F52N3WXF6MNNSH1MQ4",
                            "type": "html_text",
                            "styles": {
                              "padding": {
                                "left": 6,
                                "right": 6,
                                "top": 10,
                                "bottom": 10
                              },
                              "background_color": null
                            },
                            "properties": {
                              "display_device": ["desktop", "mobile"],
                              "content": "<div>Sign up for our newsletter</div>"
                            }
                          }
                        ]
                      },
                      {
                        "id": "01JTP6F3FFFGW8Z2VYHEHVVNGM",
                        "blocks": [
                          {
                            "id": "01JTP6F3FNN3VVA4A2V6HVE3Q7",
                            "type": "email",
                            "styles": {
                              "padding": {
                                "left": 6,
                                "right": 6,
                                "top": 10,
                                "bottom": 10
                              },
                              "background_color": null
                            },
                            "properties": {
                              "display_device": ["desktop", "mobile"],
                              "label": "Email",
                              "show_label": false,
                              "placeholder": "Enter your email address",
                              "required": true,
                              "error_messages": null,
                              "property_name": "$email"
                            }
                          }
                        ]
                      }
                    ],
                    "styles": null
                  }
                ],
                "name": "email sign-up",
                "steps": null
              },
              {
                "id": "01JTP6F3D8NC46E9Q9GZG3JX7F",
                "columns": [
                  {
                    "id": "01JTP6F3DHTYSRWKMX0R8Z9743",
                    "rows": [
                      {
                        "id": "01JTP6F3DS83D2D117G5F4G6D5",
                        "blocks": [
                          {
                            "id": "01JTP6F3DZD3N849FQ15DYRHA7",
                            "type": "html_text",
                            "styles": {
                              "padding": {
                                "left": 6,
                                "right": 6,
                                "top": 10,
                                "bottom": 10
                              },
                              "background_color": null
                            },
                            "properties": {
                              "display_device": ["desktop", "mobile"],
                              "content": "<div>Thank you for subscribing!</div>"
                            }
                          }
                        ]
                      }
                    ],
                    "styles": null
                  }
                ],
                "name": "success step",
                "steps": null
              }
            ],
            "triggers": [
              {
                "id": "01JTP6F3H4AKS4V33E89R2EX74",
                "properties": {},
                "type": "unidentified_profiles"
              },
              {
                "id": "01JTP6F3HH82JS5410DYQTB33H",
                "type": "after_close_or_submit_timeout",
                "properties": {
                  "timeout_days": 5
                }
              }
            ],
            "teaser": null,
            "name": "test",
            "styles": {
              "wrap_content": false,
              "border_styles": {
                "radius": 2,
                "color": "#000000",
                "style": null,
                "thickness": 0
              },
              "close_button": {
                "background_color": "rgba(180, 187, 195, 0.65)",
                "outline_color": "#FFFFFF",
                "color": "#FFFFFF",
                "stroke": 2,
                "size": 20,
                "margin": {
                  "left": 8,
                  "right": 8,
                  "top": 8,
                  "bottom": 8
                }
              },
              "margin": {
                "left": 0,
                "right": 0,
                "top": 0,
                "bottom": 0
              },
              "padding": {
                "left": 20,
                "right": 20,
                "top": 20,
                "bottom": 20
              },
              "minimum_height": 250,
              "width": "medium",
              "custom_width": null,
              "background_image": null,
              "background_color": "#FFFFFF",
              "input_styles": {
                "text_styles": {
                  "font_family": "Arial, 'Helvetica Neue', Helvetica, sans-serif",
                  "font_size": 16,
                  "font_weight": 400,
                  "text_color": "#000000",
                  "character_spacing": 0
                },
                "label_color": "#303B43",
                "text_color": "#000000",
                "placeholder_color": "#949596",
                "background_color": "#FFFFFF",
                "border_color": "#949596",
                "border_focus_color": "#000000",
                "focus_outline_color": "#1C65AD",
                "corner_radius": 2,
                "field_height": 38
              },
              "drop_shadow": {
                "enabled": false,
                "blur": 30,
                "color": "rgba(0,0,0,0.15)"
              },
              "overlay_color": "rgba(20,20,20,0.6)",
              "rich_text_styles": {
                "body": {
                  "font_family": "Arial, 'Helvetica Neue', Helvetica, sans-serif",
                  "font_size": 16,
                  "font_weight": 400,
                  "text_color": "#000000",
                  "line_spacing": 1.0,
                  "character_spacing": 0,
                  "alignment": "left",
                  "margin": {
                    "left": 0,
                    "right": 0,
                    "top": 0,
                    "bottom": 0
                  }
                },
                "link": {
                  "color": "#0066cc",
                  "decoration": "underline"
                },
                "h1": {
                  "font_family": "Arial, 'Helvetica Neue', Helvetica, sans-serif",
                  "font_size": 48,
                  "font_weight": 700,
                  "text_color": "#000000",
                  "line_spacing": 1.0,
                  "character_spacing": 0,
                  "alignment": "left",
                  "margin": {
                    "left": 0,
                    "right": 0,
                    "top": 0,
                    "bottom": 0
                  }
                },
                "h2": {
                  "font_family": "Arial, 'Helvetica Neue', Helvetica, sans-serif",
                  "font_size": 36,
                  "font_weight": 700,
                  "text_color": "#000000",
                  "line_spacing": 1.0,
                  "character_spacing": 0,
                  "alignment": "left",
                  "margin": {
                    "left": 0,
                    "right": 0,
                    "top": 0,
                    "bottom": 0
                  }
                },
                "h3": {
                  "font_family": "Arial, 'Helvetica Neue', Helvetica, sans-serif",
                  "font_size": 28,
                  "font_weight": 700,
                  "text_color": "#000000",
                  "line_spacing": 1.0,
                  "character_spacing": 0,
                  "alignment": "left",
                  "margin": {
                    "left": 0,
                    "right": 0,
                    "top": 0,
                    "bottom": 0
                  }
                },
                "h4": {
                  "font_family": "Arial, 'Helvetica Neue', Helvetica, sans-serif",
                  "font_size": 20,
                  "font_weight": 700,
                  "text_color": "#000000",
                  "line_spacing": 1.0,
                  "character_spacing": 0,
                  "alignment": "left",
                  "margin": {
                    "left": 0,
                    "right": 0,
                    "top": 0,
                    "bottom": 0
                  }
                },
                "h5": {
                  "font_family": "Arial, 'Helvetica Neue', Helvetica, sans-serif",
                  "font_size": 13,
                  "font_weight": 700,
                  "text_color": "#000000",
                  "line_spacing": 1.0,
                  "character_spacing": 0,
                  "alignment": "left",
                  "margin": {
                    "left": 0,
                    "right": 0,
                    "top": 0,
                    "bottom": 0
                  }
                },
                "h6": {
                  "font_family": "Arial, 'Helvetica Neue', Helvetica, sans-serif",
                  "font_size": 11,
                  "font_weight": 700,
                  "text_color": "#000000",
                  "line_spacing": 1.0,
                  "character_spacing": 0,
                  "alignment": "left",
                  "margin": {
                    "left": 0,
                    "right": 0,
                    "top": 0,
                    "bottom": 0
                  }
                }
              },
              "mobile_overlay": {
                "color": "rgba(20, 20, 20, 0.5)",
                "enabled": false
              },
              "banner_styles": null
            },
            "properties": {
              "side_image_settings": null,
              "click_outside_to_close": ["mobile", "desktop"],
              "rule_based_trigger_evaluation": "any",
              "record_utm_params_on_submit": false,
              "show_close_button": true
            },
            "type": "popup",
            "location": null,
            "status": "draft",
            "ab_test": false
          }
        ]
      },
      "created_at": "2025-05-07T20:19:50+00:00",
      "updated_at": "2025-05-07T20:19:50+00:00"
    },
    "links": {
      "self": "https://a.klaviyo.com/api/forms/Ser5Vq/"
    }
  },
  "links": {
    "self": "https://a.klaviyo.com/api/forms/Ser5Vq"
  }
}
```

## Create a form

Create a new form using an encoded form definition. `POST /api/forms/`

Below we have outlined the recommended workflow for creating a new form via Forms API:

1. Create a form with your desired settings in the Klaviyo UI and copy its form ID from the URL (https://www.klaviyo.com/forms/<FORM_ID>). It can be helpful to first perform a GET to retrieve an existing form to define the structure for a step, and use that when creating your form.
2. Retrieve that form using the `GET /api/forms/{id}`; this will return the encoded form's definition.
3. Modify the definition in the following way:
   1. Delete all instances of `id` returned in the GET response.
   2. Remove `created_at` and `updated_at` from the `attributes` object.
   3. Modify your form's definition as needed.
4. Use the modified response body as the request body for your Create Form call.

Your payload should end up looking like this:

```json Request payload
{
  "data": {
    "type": "form",
    "attributes": {
      "status": "draft",
      "ab_test": false,
      "name": "New Class Discount - Gym",
      "definition": {
        "versions": [
          {
            "steps": [
              {
                "columns": [
                  {
                    "rows": [
                      {
                        "blocks": [
                          {
                            "type": "image",
                            "styles": {
                              "horizontal_alignment": "left",
                              "width": 185,
                              "padding": {
                                "left": 0,
                                "right": 0,
                                "top": 0,
                                "bottom": 32
                              },
                              "background_color": null
                            },
                            "properties": {
                              "display_device": ["desktop", "mobile"],
                              "image": {
                                "id": 213397732,
                                "alt_text": "logo placeholder"
                              },
                              "additional_fields": null
                            },
                            "action": null
                          }
                        ]
                      },
                      {
                        "blocks": [
                          {
                            "type": "html_text",
                            "styles": {
                              "padding": {
                                "left": 0,
                                "right": 0,
                                "top": 0,
                                "bottom": 0
                              },
                              "background_color": null
                            },
                            "properties": {
                              "display_device": ["desktop", "mobile"],
                              "content": "<h1 style=\"font-size: 14px; font-family: Arial, 'Helvetica Neue', Helvetica, sans-serif; font-weight: 400; text-align: left; line-height: 400%;\"><span style=\"font-family: Poppins, Arial, 'Helvetica Neue', Helvetica, sans-serif; font-weight: 800; font-style: normal; font-size: 80px; color: rgb(71, 95, 71);\">YOU&rsquo;VE </span><br><span style=\"font-family: Poppins, Arial, 'Helvetica Neue', Helvetica, sans-serif; font-weight: 800; font-style: normal; font-size: 80px; color: rgb(71, 95, 71);\">GOT 20%&nbsp;</span><br><span style=\"font-family: Poppins, Arial, 'Helvetica Neue', Helvetica, sans-serif; font-weight: 800; font-style: normal; font-size: 80px; color: rgb(71, 95, 71);\"><span style=\"font-style: italic;\">OFF NEW CLASSES</span>&nbsp;</span></h1>"
                            }
                          }
                        ]
                      },
                      {
                        "blocks": [
                          {
                            "type": "button",
                            "styles": {
                              "padding": {
                                "left": 0,
                                "right": 0,
                                "top": 24,
                                "bottom": 16
                              },
                              "background_color": null,
                              "width": "fit",
                              "height": 58,
                              "hover_background_color": null,
                              "hover_text_color": null,
                              "border_styles": {
                                "radius": 0,
                                "color": "rgba(71,95,71)",
                                "style": "solid",
                                "thickness": 2
                              },
                              "text_styles": {
                                "font_family": "'Poppins', Arial, 'Helvetica Neue', Helvetica, sans-serif",
                                "font_size": 32,
                                "font_weight": 400,
                                "text_color": "rgba(71,95,71)",
                                "character_spacing": 0
                              },
                              "color": "rgba(135,11,33,0)"
                            },
                            "properties": {
                              "display_device": ["desktop", "mobile"],
                              "label": "GET ACTIVE",
                              "additional_fields": [
                                {
                                  "name": "$source",
                                  "value": "New Class Discount - Gym"
                                }
                              ]
                            },
                            "action": {
                              "submit": true,
                              "type": "next_step",
                              "properties": {
                                "list_id": "{SOME_LIST_ID}"
                              }
                            }
                          }
                        ]
                      },
                      {
                        "blocks": [
                          {
                            "type": "button",
                            "styles": {
                              "padding": {
                                "left": 0,
                                "right": 0,
                                "top": 0,
                                "bottom": 0
                              },
                              "background_color": null,
                              "width": "fit",
                              "height": 24,
                              "hover_background_color": null,
                              "hover_text_color": null,
                              "border_styles": {
                                "radius": 2,
                                "color": null,
                                "style": null,
                                "thickness": null
                              },
                              "text_styles": {
                                "font_family": "'Poppins', Arial, 'Helvetica Neue', Helvetica, sans-serif",
                                "font_size": 20,
                                "font_weight": 400,
                                "text_color": "rgba(71,95,71)",
                                "character_spacing": 0
                              },
                              "color": "rgba(135,11,33,0)"
                            },
                            "properties": {
                              "display_device": ["desktop", "mobile"],
                              "label": "NO THANKS",
                              "additional_fields": [
                                {
                                  "name": "$source",
                                  "value": "New Class Discount - Gym"
                                }
                              ]
                            },
                            "action": {
                              "submit": false,
                              "type": "close",
                              "properties": null
                            }
                          }
                        ]
                      }
                    ],
                    "styles": null
                  },
                  {
                    "rows": [],
                    "styles": {
                      "background_image": {
                        "styles": {
                          "horizontal_alignment": "center",
                          "width": 500,
                          "position": "cover",
                          "vertical_alignment": "center",
                          "custom_width": null
                        },
                        "properties": {
                          "id": 213397207,
                          "alt_text": null
                        }
                      },
                      "background_color": null
                    }
                  }
                ],
                "name": "Micro yes",
                "steps": null
              },
              {
                "columns": [
                  {
                    "rows": [
                      {
                        "blocks": [
                          {
                            "type": "image",
                            "styles": {
                              "horizontal_alignment": "left",
                              "width": 185,
                              "padding": {
                                "left": 0,
                                "right": 0,
                                "top": 0,
                                "bottom": 32
                              },
                              "background_color": null
                            },
                            "properties": {
                              "display_device": ["desktop", "mobile"],
                              "image": {
                                "id": 213397732,
                                "alt_text": "logo placeholder"
                              },
                              "additional_fields": null
                            },
                            "action": null
                          }
                        ]
                      },
                      {
                        "blocks": [
                          {
                            "type": "html_text",
                            "styles": {
                              "padding": {
                                "left": 0,
                                "right": 0,
                                "top": 0,
                                "bottom": 0
                              },
                              "background_color": null
                            },
                            "properties": {
                              "display_device": ["desktop", "mobile"],
                              "content": "<h1 style=\"font-size: 14px; font-family: Arial, 'Helvetica Neue', Helvetica, sans-serif; font-weight: 400; text-align: left; line-height: 400%;\"><span style=\"font-family: Poppins, Arial, 'Helvetica Neue', Helvetica, sans-serif; font-weight: 800; font-style: normal; font-size: 80px; color: rgb(71, 95, 71);\">YOU&rsquo;VE </span><br><span style=\"font-family: Poppins, Arial, 'Helvetica Neue', Helvetica, sans-serif; font-weight: 800; font-style: normal; font-size: 80px; color: rgb(71, 95, 71);\">GOT 20%&nbsp;</span><br><span style=\"font-family: Poppins, Arial, 'Helvetica Neue', Helvetica, sans-serif; font-weight: 800; font-style: normal; font-size: 80px; color: rgb(71, 95, 71);\"><span style=\"font-style: italic;\">OFF NEW CLASSES</span>&nbsp;</span></h1>"
                            }
                          }
                        ]
                      },
                      {
                        "blocks": [
                          {
                            "type": "email",
                            "styles": {
                              "padding": {
                                "left": 0,
                                "right": 104,
                                "top": 0,
                                "bottom": 0
                              },
                              "background_color": null
                            },
                            "properties": {
                              "display_device": ["desktop", "mobile"],
                              "label": "email",
                              "show_label": false,
                              "placeholder": "EMAIL",
                              "required": true,
                              "error_messages": null,
                              "property_name": "$email"
                            }
                          }
                        ]
                      },
                      {
                        "blocks": [
                          {
                            "type": "button",
                            "styles": {
                              "padding": {
                                "left": 0,
                                "right": 0,
                                "top": 8,
                                "bottom": 16
                              },
                              "background_color": null,
                              "width": "fit",
                              "height": 58,
                              "hover_background_color": null,
                              "hover_text_color": null,
                              "border_styles": {
                                "radius": 0,
                                "color": "rgba(71,95,71)",
                                "style": "solid",
                                "thickness": 2
                              },
                              "text_styles": {
                                "font_family": "'Poppins', Arial, 'Helvetica Neue', Helvetica, sans-serif",
                                "font_size": 32,
                                "font_weight": 400,
                                "text_color": "rgba(71,95,71)",
                                "character_spacing": 0
                              },
                              "color": "rgba(135,11,33,0)"
                            },
                            "properties": {
                              "display_device": ["desktop", "mobile"],
                              "label": "GET 20% OFF",
                              "additional_fields": [
                                {
                                  "name": "$source",
                                  "value": "New Class Discount - Gym"
                                }
                              ]
                            },
                            "action": {
                              "submit": true,
                              "type": "next_step",
                              "properties": {
                                "list_id": "{SOME_LIST_ID}"
                              }
                            }
                          }
                        ]
                      },
                      {
                        "blocks": [
                          {
                            "type": "button",
                            "styles": {
                              "padding": {
                                "left": 0,
                                "right": 0,
                                "top": 0,
                                "bottom": 0
                              },
                              "background_color": null,
                              "width": "fit",
                              "height": 24,
                              "hover_background_color": null,
                              "hover_text_color": null,
                              "border_styles": {
                                "radius": 2,
                                "color": null,
                                "style": null,
                                "thickness": null
                              },
                              "text_styles": {
                                "font_family": "'Poppins', Arial, 'Helvetica Neue', Helvetica, sans-serif",
                                "font_size": 20,
                                "font_weight": 400,
                                "text_color": "rgba(71,95,71)",
                                "character_spacing": 0
                              },
                              "color": "rgba(135,11,33,0)"
                            },
                            "properties": {
                              "display_device": ["desktop", "mobile"],
                              "label": "NO THANKS",
                              "additional_fields": [
                                {
                                  "name": "$source",
                                  "value": "New Class Discount - Gym"
                                }
                              ]
                            },
                            "action": {
                              "submit": false,
                              "type": "close",
                              "properties": null
                            }
                          }
                        ]
                      }
                    ],
                    "styles": null
                  },
                  {
                    "rows": [],
                    "styles": {
                      "background_image": {
                        "styles": {
                          "horizontal_alignment": "center",
                          "width": 500,
                          "position": "cover",
                          "vertical_alignment": "center",
                          "custom_width": null
                        },
                        "properties": {
                          "id": 213397207,
                          "alt_text": null
                        }
                      },
                      "background_color": null
                    }
                  }
                ],
                "name": "Email opt in",
                "steps": null
              },
              {
                "columns": [
                  {
                    "rows": [
                      {
                        "blocks": [
                          {
                            "type": "image",
                            "styles": {
                              "horizontal_alignment": "left",
                              "width": 185,
                              "padding": {
                                "left": 0,
                                "right": 0,
                                "top": 0,
                                "bottom": 32
                              },
                              "background_color": null
                            },
                            "properties": {
                              "display_device": ["desktop", "mobile"],
                              "image": {
                                "id": 213397732,
                                "alt_text": "logo placeholder"
                              },
                              "additional_fields": null
                            },
                            "action": null
                          }
                        ]
                      },
                      {
                        "blocks": [
                          {
                            "type": "html_text",
                            "styles": {
                              "padding": {
                                "left": 0,
                                "right": 0,
                                "top": 0,
                                "bottom": 0
                              },
                              "background_color": null
                            },
                            "properties": {
                              "display_device": ["desktop", "mobile"],
                              "content": "<h1 style=\"font-size: 14px; font-family: Arial, 'Helvetica Neue', Helvetica, sans-serif; font-weight: 400; text-align: left; line-height: 400%; letter-spacing: 1px;\"><span style=\"color: rgb(71, 95, 71); font-family: Poppins, Arial, 'Helvetica Neue', Helvetica, sans-serif; font-weight: 800; font-style: normal; font-size: 72px;\">ONE MORE STEP</span></h1>"
                            }
                          }
                        ]
                      },
                      {
                        "blocks": [
                          {
                            "type": "sms_disclosure",
                            "styles": {
                              "padding": {
                                "left": 0,
                                "right": 0,
                                "top": 8,
                                "bottom": 8
                              },
                              "background_color": null,
                              "link_styles": {
                                "font_family": "Arial, 'Helvetica Neue', Helvetica, sans-serif",
                                "font_size": 12,
                                "font_weight": 400,
                                "text_color": "#000000",
                                "character_spacing": 0
                              },
                              "text_styles": {
                                "font_family": "Arial, 'Helvetica Neue', Helvetica, sans-serif",
                                "font_size": 12,
                                "font_weight": 400,
                                "text_color": "#000000",
                                "character_spacing": 0
                              }
                            },
                            "properties": {
                              "display_device": ["desktop", "mobile"],
                              "content": {
                                "type": "custom",
                                "compliance_company_name": "Test Account",
                                "privacy_policy_url": "http://google.com",
                                "terms_of_service_url": "http://haha.com",
                                "html": "<p>By submitting this form and signing up for texts, you consent to receive marketing text messages (e.g. promos, cart reminders) from Test Account at the number provided, including messages sent by autodialer. Consent is not a condition of purchase. Msg & data rates may apply. Msg frequency varies. Unsubscribe at any time by replying STOP or clicking the unsubscribe link (where available). <a href=\"http://google.com\">Privacy Policy</a> & <a href=\"http://haha.com\">Terms</a>.</p>"
                              }
                            }
                          }
                        ]
                      },
                      {
                        "blocks": [
                          {
                            "type": "phone_number",
                            "styles": {
                              "padding": {
                                "left": 0,
                                "right": 104,
                                "top": 0,
                                "bottom": 0
                              },
                              "background_color": null
                            },
                            "properties": {
                              "display_device": ["desktop", "mobile"],
                              "label": "",
                              "show_label": false,
                              "placeholder": "Phone Number",
                              "required": false,
                              "error_messages": null,
                              "property_name": "$phone_number",
                              "sms_consent_type": ["phone_number_only"]
                            }
                          }
                        ]
                      },
                      {
                        "blocks": [
                          {
                            "type": "button",
                            "styles": {
                              "padding": {
                                "left": 0,
                                "right": 0,
                                "top": 8,
                                "bottom": 16
                              },
                              "background_color": null,
                              "width": "fit",
                              "height": 58,
                              "hover_background_color": null,
                              "hover_text_color": null,
                              "border_styles": {
                                "radius": 0,
                                "color": "rgba(71,95,71)",
                                "style": "solid",
                                "thickness": 2
                              },
                              "text_styles": {
                                "font_family": "'Poppins', Arial, 'Helvetica Neue', Helvetica, sans-serif",
                                "font_size": 32,
                                "font_weight": 400,
                                "text_color": "rgba(71,95,71)",
                                "character_spacing": 0
                              },
                              "color": "rgba(135,11,33,0)"
                            },
                            "properties": {
                              "display_device": ["desktop", "mobile"],
                              "label": "GET 20% OFF",
                              "additional_fields": [
                                {
                                  "name": "$source",
                                  "value": "New Class Discount - Gym"
                                }
                              ]
                            },
                            "action": {
                              "submit": true,
                              "type": "next_step",
                              "properties": {
                                "list_id": "{SOME_LIST_ID}"
                              }
                            }
                          }
                        ]
                      },
                      {
                        "blocks": [
                          {
                            "type": "button",
                            "styles": {
                              "padding": {
                                "left": 0,
                                "right": 0,
                                "top": 0,
                                "bottom": 0
                              },
                              "background_color": null,
                              "width": "fit",
                              "height": 24,
                              "hover_background_color": null,
                              "hover_text_color": null,
                              "border_styles": {
                                "radius": 2,
                                "color": null,
                                "style": null,
                                "thickness": null
                              },
                              "text_styles": {
                                "font_family": "'Poppins', Arial, 'Helvetica Neue', Helvetica, sans-serif",
                                "font_size": 20,
                                "font_weight": 400,
                                "text_color": "rgba(71,95,71)",
                                "character_spacing": 0
                              },
                              "color": "rgba(135,11,33,0)"
                            },
                            "properties": {
                              "display_device": ["desktop", "mobile"],
                              "label": "NO THANKS",
                              "additional_fields": [
                                {
                                  "name": "$source",
                                  "value": "New Class Discount - Gym"
                                }
                              ]
                            },
                            "action": {
                              "submit": false,
                              "type": "close",
                              "properties": null
                            }
                          }
                        ]
                      }
                    ],
                    "styles": null
                  },
                  {
                    "rows": [],
                    "styles": {
                      "background_image": {
                        "styles": {
                          "horizontal_alignment": "center",
                          "width": 500,
                          "position": "cover",
                          "vertical_alignment": "center",
                          "custom_width": null
                        },
                        "properties": {
                          "id": 213397207,
                          "alt_text": null
                        }
                      },
                      "background_color": null
                    }
                  }
                ],
                "name": "SMS opt-in",
                "steps": null
              },
              {
                "columns": [
                  {
                    "rows": [
                      {
                        "blocks": [
                          {
                            "type": "image",
                            "styles": {
                              "horizontal_alignment": "left",
                              "width": 185,
                              "padding": {
                                "left": 0,
                                "right": 0,
                                "top": 0,
                                "bottom": 32
                              },
                              "background_color": null
                            },
                            "properties": {
                              "display_device": ["desktop", "mobile"],
                              "image": {
                                "id": 213397732,
                                "alt_text": "logo placeholder"
                              },
                              "additional_fields": null
                            },
                            "action": null
                          }
                        ]
                      },
                      {
                        "blocks": [
                          {
                            "type": "html_text",
                            "styles": {
                              "padding": {
                                "left": 0,
                                "right": 0,
                                "top": 0,
                                "bottom": 0
                              },
                              "background_color": null
                            },
                            "properties": {
                              "display_device": ["desktop", "mobile"],
                              "content": "<h1 style=\"font-size: 14px; line-height: 400%; font-family: Arial, 'Helvetica Neue', Helvetica, sans-serif; text-align: left;\"><span style=\"font-weight: 800; font-size: 80px; font-family: Poppins, Arial, 'Helvetica Neue', Helvetica, sans-serif; color: rgb(71, 95, 71);\">THANKS FOR <span style=\"font-style: italic;\">SIGNING UP</span></span></h1>"
                            }
                          }
                        ]
                      },
                      {
                        "blocks": [
                          {
                            "type": "button",
                            "styles": {
                              "padding": {
                                "left": 0,
                                "right": 0,
                                "top": 24,
                                "bottom": 24
                              },
                              "background_color": null,
                              "width": "fit",
                              "height": 24,
                              "hover_background_color": null,
                              "hover_text_color": null,
                              "border_styles": {
                                "radius": 2,
                                "color": null,
                                "style": null,
                                "thickness": null
                              },
                              "text_styles": {
                                "font_family": "'Century Gothic', CenturyGothic, AppleGothic, sans-serif",
                                "font_size": 20,
                                "font_weight": 700,
                                "text_color": "rgba(71,95,71)",
                                "character_spacing": 0
                              },
                              "color": "rgba(48,59,67,0)"
                            },
                            "properties": {
                              "display_device": ["desktop", "mobile"],
                              "label": "BROWSE MORE CLASSES",
                              "additional_fields": [
                                {
                                  "name": "$source",
                                  "value": "New Class Discount - Gym"
                                }
                              ]
                            },
                            "action": {
                              "submit": true,
                              "type": "go_to_inbox",
                              "properties": null
                            }
                          }
                        ]
                      }
                    ],
                    "styles": null
                  },
                  {
                    "rows": [],
                    "styles": {
                      "background_image": {
                        "styles": {
                          "horizontal_alignment": "center",
                          "width": 500,
                          "position": "cover",
                          "vertical_alignment": "center",
                          "custom_width": null
                        },
                        "properties": {
                          "id": 213397207,
                          "alt_text": null
                        }
                      },
                      "background_color": null
                    }
                  }
                ],
                "name": "success step",
                "steps": null
              }
            ],
            "triggers": [
              {
                "properties": {},
                "type": "unidentified_profiles"
              },
              {
                "properties": {},
                "type": "previously_submitted"
              },
              {
                "type": "delay",
                "properties": {
                  "seconds": 5
                }
              },
              {
                "type": "scroll_percentage",
                "properties": {
                  "percentage": 30
                }
              },
              {
                "properties": {},
                "type": "exit_intent"
              },
              {
                "type": "after_close_or_submit_timeout",
                "properties": {
                  "timeout_days": 1
                }
              }
            ],
            "teaser": {
              "content": "<p style=\"text-align: center; font-size: 14px; font-family: Arial, 'Helvetica Neue', Helvetica, sans-serif; font-weight: 400;\"><span style=\"font-size: 18px; color: rgb(215, 223, 216); font-family: 'Century Gothic', CenturyGothic, AppleGothic, sans-serif; font-weight: bold; font-style: normal;\">20% OFF&nbsp;</span><span style=\"font-size: 18px; color: rgb(215, 223, 216); font-family: 'Century Gothic', CenturyGothic, AppleGothic, sans-serif; font-weight: bold; font-style: normal;\">NEW CLASSES</span></p>",
              "display_order": "after",
              "teaser_type": "rectangle",
              "location": "center_left",
              "size": "custom",
              "custom_size": 240,
              "styles": {
                "background_color": "rgba(71,95,71)",
                "drop_shadow": {
                  "enabled": true,
                  "blur": 30,
                  "color": "rgba(0,0,0,0.15)"
                },
                "corner_radius": 4,
                "background_image": null,
                "close_button": {
                  "background_color": "#000000",
                  "outline_color": "#FFFFFF",
                  "color": "#FFFFFF",
                  "stroke": 2,
                  "size": 20,
                  "margin": {
                    "left": 16,
                    "right": 16,
                    "top": 16,
                    "bottom": 16
                  }
                },
                "margin": {
                  "left": 20,
                  "right": 0,
                  "top": 0,
                  "bottom": 0
                }
              },
              "close_button": false
            },
            "name": "Default Flyout",
            "styles": {
              "wrap_content": false,
              "border_styles": {
                "radius": 0,
                "color": "#000000",
                "style": null,
                "thickness": 0
              },
              "close_button": {
                "background_color": "rgba(255,255,255,0)",
                "outline_color": "rgba(255,255,255,0)",
                "color": "rgba(55,63,71,0)",
                "stroke": 1,
                "size": 35,
                "margin": {
                  "left": 8,
                  "right": 8,
                  "top": 8,
                  "bottom": 8
                }
              },
              "margin": {
                "left": 0,
                "right": 0,
                "top": 0,
                "bottom": 0
              },
              "padding": {
                "left": 56,
                "right": 56,
                "top": 0,
                "bottom": 0
              },
              "minimum_height": 640,
              "width": "custom",
              "custom_width": 1000,
              "background_image": null,
              "background_color": "#D7DFD8",
              "input_styles": {
                "text_styles": {
                  "font_family": "\"Century Gothic\", CenturyGothic, AppleGothic, sans-serif",
                  "font_size": 20,
                  "font_weight": 400,
                  "text_color": "#000000",
                  "character_spacing": 0
                },
                "label_color": "#475F47",
                "text_color": "#475F47",
                "placeholder_color": "#475F47",
                "background_color": "rgba(255,255,255,0)",
                "border_color": "#475F47",
                "border_focus_color": "#475F47",
                "focus_outline_color": "#0064CD",
                "corner_radius": 0,
                "field_height": 58
              },
              "drop_shadow": {
                "enabled": true,
                "blur": 30,
                "color": "rgba(0,0,0,0.15)"
              },
              "overlay_color": "rgba(20,20,20,0.6)",
              "rich_text_styles": {
                "body": {
                  "font_family": "Arial, 'Helvetica Neue', Helvetica, sans-serif",
                  "font_size": 16,
                  "font_weight": 400,
                  "text_color": "#000000",
                  "line_spacing": 1.0,
                  "character_spacing": 0,
                  "alignment": "left",
                  "margin": {
                    "left": 0,
                    "right": 0,
                    "top": 0,
                    "bottom": 0
                  }
                },
                "link": {
                  "color": "#0066cc",
                  "decoration": "underline"
                },
                "h1": {
                  "font_family": "Arial, 'Helvetica Neue', Helvetica, sans-serif",
                  "font_size": 48,
                  "font_weight": 700,
                  "text_color": "#000000",
                  "line_spacing": 1.0,
                  "character_spacing": 0,
                  "alignment": "left",
                  "margin": {
                    "left": 0,
                    "right": 0,
                    "top": 0,
                    "bottom": 0
                  }
                },
                "h2": {
                  "font_family": "Arial, 'Helvetica Neue', Helvetica, sans-serif",
                  "font_size": 36,
                  "font_weight": 700,
                  "text_color": "#000000",
                  "line_spacing": 1.0,
                  "character_spacing": 0,
                  "alignment": "left",
                  "margin": {
                    "left": 0,
                    "right": 0,
                    "top": 0,
                    "bottom": 0
                  }
                },
                "h3": {
                  "font_family": "Arial, 'Helvetica Neue', Helvetica, sans-serif",
                  "font_size": 28,
                  "font_weight": 700,
                  "text_color": "#000000",
                  "line_spacing": 1.0,
                  "character_spacing": 0,
                  "alignment": "left",
                  "margin": {
                    "left": 0,
                    "right": 0,
                    "top": 0,
                    "bottom": 0
                  }
                },
                "h4": {
                  "font_family": "Arial, 'Helvetica Neue', Helvetica, sans-serif",
                  "font_size": 20,
                  "font_weight": 700,
                  "text_color": "#000000",
                  "line_spacing": 1.0,
                  "character_spacing": 0,
                  "alignment": "left",
                  "margin": {
                    "left": 0,
                    "right": 0,
                    "top": 0,
                    "bottom": 0
                  }
                },
                "h5": {
                  "font_family": "Arial, 'Helvetica Neue', Helvetica, sans-serif",
                  "font_size": 13,
                  "font_weight": 700,
                  "text_color": "#000000",
                  "line_spacing": 1.0,
                  "character_spacing": 0,
                  "alignment": "left",
                  "margin": {
                    "left": 0,
                    "right": 0,
                    "top": 0,
                    "bottom": 0
                  }
                },
                "h6": {
                  "font_family": "Arial, 'Helvetica Neue', Helvetica, sans-serif",
                  "font_size": 11,
                  "font_weight": 700,
                  "text_color": "#000000",
                  "line_spacing": 1.0,
                  "character_spacing": 0,
                  "alignment": "left",
                  "margin": {
                    "left": 0,
                    "right": 0,
                    "top": 0,
                    "bottom": 0
                  }
                }
              },
              "mobile_overlay": {
                "color": "rgba(20, 20, 20, 0.5)",
                "enabled": false
              },
              "banner_styles": null
            },
            "properties": {
              "side_image_settings": {
                "size": "medium",
                "alignment": "right",
                "device_type": ["desktop", "mobile"]
              },
              "click_outside_to_close": ["mobile", "desktop"],
              "rule_based_trigger_evaluation": "any",
              "record_utm_params_on_submit": false,
              "show_close_button": true
            },
            "type": "popup",
            "location": null,
            "status": "draft",
            "ab_test": false
          }
        ]
      }
    },
    "links": {
      "self": "https://a.klaviyo.com/api/forms/VcgwuS/"
    }
  },
  "links": {
    "self": "https://a.klaviyo.com/api/forms/VcgwuS"
  }
}
```

All forms must be created in a `draft` status. A successful request will return a `201` and the form's definition augmented with IDs.

## Update a form

Edit a form's draft with the [Update Form](https://developers.klaviyo.com/en/reference/update_form.md) endpoint. `PATCH /api/forms/{id}`

You can update a form's `name` and `definition`. Attributes you omit keep their current values. Update Form supports web forms only.

When you send a `definition`, it replaces the stored definition entirely, so use the same workflow as creating a form:

1. Retrieve the form with `GET /api/forms/{id}`.
2. Modify the draft versions in the returned definition. Keep every version and its `id`.
3. Send the full definition in your Update Form request.

The following rules apply to updates:

- You can only edit draft versions. Return each live version exactly as you received it.
- You can't add or remove versions.
- `status` and `ab_test` are read-only, both on the form and on each version. A version's `channel` and `specialties` are also read-only. Changing a read-only field returns a `400` error that points to the field.
- If the form changes while your request is processing, the request returns a `409` error. Retrieve the form again and retry.

Your changes stay in draft until you publish the form.

## Publish and unpublish a form

Publish a form's draft version with the [Publish Form](https://developers.klaviyo.com/en/reference/publish_form.md) endpoint, and take a live form down with the [Unpublish Form](https://developers.klaviyo.com/en/reference/unpublish_form.md) endpoint. Both endpoints create a job that references the form:

```curl Request
curl --request POST \
     --url https://a.klaviyo.com/api/form-publish-jobs \
     --header 'Authorization: Klaviyo-API-Key your-private-api-key' \
     --header 'accept: application/vnd.api+json' \
     --header 'content-type: application/vnd.api+json' \
     --header 'revision: 2026-10-15' \
     --data '
{
  "data": {
    "type": "form-publish-job",
    "relationships": {
      "form": {
        "data": {
          "type": "form",
          "id": "VcgwuS"
        }
      }
    }
  }
}
'
```

To unpublish, send the same request body to `POST /api/form-unpublish-jobs` with the type `form-unpublish-job`.

Both endpoints return a `202` with a job resource, but the work finishes before the response returns. The form is already live, or already unpublished, when you receive the response, and you can't retrieve the job afterwards. To confirm the result, call [Get Form](https://developers.klaviyo.com/en/reference/get_form.md) and check the form's `status`.

Keep the following in mind:

- Publishing replaces the live version with the draft version. If the form has no draft version, the request returns a `400` error.
- If the draft has an issue that blocks publishing, the request returns a `400` error that explains what to fix.
- Unpublishing a form that isn't live succeeds without making changes, so you can safely retry it.
- These endpoints don't support A/B tests. Publishing a form with a draft A/B test, or unpublishing a form with a live A/B test, returns a `409` error. Manage A/B tests from the form editor in Klaviyo.

## Next steps

- Create a form with the [Create Form endpoint](https://developers.klaviyo.com/en/reference/create_form.md).
- Make a call to [Get Form](https://developers.klaviyo.com/en/reference/get_form.md) to retrieve the newly-created form. 
- Edit the draft with [Update Form](https://developers.klaviyo.com/en/reference/update_form.md).
- Make the form live with [Publish Form](https://developers.klaviyo.com/en/reference/publish_form.md), or take it down with [Unpublish Form](https://developers.klaviyo.com/en/reference/unpublish_form.md).

## Additional resources

- <a href="https://help.klaviyo.com/hc/en-us/articles/360026474752" target="_blank">Getting started with forms</a>
- <a href="https://help.klaviyo.com/hc/en-us/articles/360002035871" target="_blank">Verify that forms are installed on your site</a>
- <a href="https://academy.klaviyo.com/en-us/courses/create-strategic-sign-up-forms" target="_blank">Learn how to create strategic sign-up forms</a>

## Forms API overview (revision 2026-10-15.pre)

### Before you begin

Check out our [general API overview](https://developers.klaviyo.com/en/reference.md) to make sure you're ready to get started with specific endpoints.

> [!WARNING]
> **Beta**
> The polymorphic form definition is in beta. Send the `revision: 2026-10-15.pre` header to use it. Endpoints may change before general availability. The generally available Web form contracts at `2026-10-15` and earlier don't change. See the [Forms API overview](https://developers.klaviyo.com/en/reference/forms.md) for those.

At revision `2026-10-15.pre`, the Forms API supports two kinds of forms:

- **Web forms** appear on your website.
- **In-App forms** appear inside your mobile app.

Both kinds share one form definition shape. You choose the kind with the `type` field on the definition.

> [!CAUTION]
> **Breaking change for beta callers**
> If you already call the Forms API with a `2026-10-15.pre` revision header, the `definition` attribute has a new shape. You must wrap your existing `versions` array in an object that has a `type` of `web`. See [Move an existing Web form integration to the beta shape](#move-an-existing-web-form-integration-to-the-beta-shape).

### Supported operations

| Operation | Endpoint | Web forms | In-App forms |
| --- | --- | --- | --- |
| Create Form | `POST /api/forms/` | Yes | Yes (draft only) |
| Get Form | `GET /api/forms/{id}` | Yes | Yes |
| Get Forms | `GET /api/forms/` | Yes | Yes |
| Update Form | `PATCH /api/forms/{id}` | Yes | Yes (draft versions only) |
| Publish Form | `POST /api/form-publish-jobs` | Yes | Yes |
| Unpublish Form | `POST /api/form-unpublish-jobs` | Yes | Yes |

Keep the following limitations in mind:

- Publish Form and Unpublish Form don't return a job that you can retrieve. To confirm the result, call Get Form and check the form's `status`. See [Publish and unpublish a form](#publish-and-unpublish-a-form).
- You can't convert a form from one type to the other. A form keeps the `type` it was created with.
- In-App forms don't support A/B tests. You can't create or edit an In-App A/B test with the API.
- Create Form accepts exactly one version and one step for In-App forms.

### Data model

A form has the following:

- `id`

  The form ID.

- `attributes`

  - `name`

    The name of the form.

  - `status`

    The current status of the form, e.g., `draft` or `live`.

  - `ab_test`

    Whether or not the form has an A/B test. This is always `false` for In-App forms.

  - `created_at`

    The timestamp of when the form was created.

  - `updated_at`

    The timestamp of when the form was last updated.

  - `definition`

    A definition of the form. It has the following fields:

    - `type`

      The kind of form: `web` or `in-app`. This value decides which fields each entry in `versions` accepts.

    - `versions`

      The versions of the form. Each version holds the form's layout, content, triggers, and targeting.

#### Web form definitions

When `type` is `web`, each entry in `versions` has the same fields as the `definition.versions` entries in the [Forms API overview](https://developers.klaviyo.com/en/reference/forms.md). Those fields are unchanged. The only difference is the `type` field next to `versions`.

`ab_test` stays a top-level attribute of the form for Web forms.

#### In-App form definitions

When `type` is `in-app`, each entry in `versions` has the following fields:

- `form_type`

  The layout of the form: `popup`, `fullscreen`, or `flyout`.

- `location`

  The position of a flyout: `top_center` or `bottom_center`. Required when `form_type` is `flyout`. Not allowed for other layouts.

- `steps`

  The screens of the form. Each step has `columns`, each column has `rows`, and each row has `blocks`.

- `triggers`

  When and how often the form appears. See [Triggers](#triggers).

- `targeting`

  Optional. The audience for the version, as an `allow_list` or `deny_list` of list and segment IDs. If you include `targeting`, it must name at least one list or segment. If you omit it, the form can show to all profiles with the mobile app.

- `styles`

  Optional. Styling for the form container, such as `width`, `background_color`, and `padding`. If you omit it, Klaviyo applies defaults.

Targeting belongs to each version, not to the definition.

Klaviyo generates the `id` of every version, step, column, row, and block. Don't send these IDs, or the `name`, `status`, or `ab_test` of a version, when you create a form. Create Form returns them in the response.

##### Blocks

Each block has a `type`. In-App forms support the following block types:

| Block type | Description |
| --- | --- |
| `text` | Text with basic HTML formatting. |
| `image` | An image from a `src` URL or a Klaviyo image library `asset_id`. It can have an optional `action`. |
| `button` | A button with a `label` and an `action`. |
| `coupon` | A static coupon code. |
| `countdown_timer` | A countdown to a fixed end time, or for a fixed duration. |
| `review` | A review that you supply. The review isn't looked up from your account. |
| `custom_html` | Custom HTML. Your account must be allowed to use custom CSS and HTML. |

A button's `action` has a `type` of `close_form`, `deeplink_to_screen`, or `open_url`:

- For `deeplink_to_screen`, send `deeplink_url`. To send each platform to a different screen, set `use_separate_deeplink_urls` to `true` and send both `deeplink_url_ios` and `deeplink_url_android` instead.
- For `open_url`, send `web_url`. The URL scheme must be `http`, `https`, `mailto`, `tel`, or `sms`.

##### Triggers

The `triggers` object controls when the form appears:

- `display_trigger`

  What causes the form to appear. Set its `type` to one of the following:

  - `app_open`: The form appears when a profile opens your app.
  - `performed_event`: The form appears when a profile performs an event. Send the `event_name`. You can also send one entry in `property_filters` to match an event property exactly.
  - `push_notification_open`: The form appears when a profile opens a push notification. Send the `message_title` to match.

- `delay_seconds`

  How long to wait after the trigger, in seconds, up to 86400. The default is `0`.

- `timeout_days`

  The minimum number of days before the form shows to the same profile again. The default is `7`.

- `suppress_after_dismiss`

  Whether to stop showing the form to a profile after they dismiss it. The default is `true`.

### Create a form

Create a draft form with the [Create Form](https://developers.klaviyo.com/en/reference/create_form.md) endpoint. `POST /api/forms/`

All forms are created in a `draft` status. The `status` attribute is optional and defaults to `draft`, so you can omit it. Sending `live` returns a `400` error. Send a `definition` with a `type` of `web` or `in-app`. A successful request returns a `201` and the form's definition, including the IDs that Klaviyo generated.

#### Create an In-App form

The following request creates an In-App popup with a text block and a button. The popup appears 5 seconds after a profile opens your app.

```curl Request
curl --request POST \
     --url https://a.klaviyo.com/api/forms/ \
     --header 'Authorization: Klaviyo-API-Key your-private-api-key' \
     --header 'accept: application/vnd.api+json' \
     --header 'content-type: application/vnd.api+json' \
     --header 'revision: 2026-10-15.pre' \
     --data '
{
  "data": {
    "type": "form",
    "attributes": {
      "name": "Welcome offer",
      "definition": {
        "type": "in-app",
        "versions": [
          {
            "form_type": "popup",
            "triggers": {
              "display_trigger": {
                "type": "app_open"
              },
              "delay_seconds": 5,
              "timeout_days": 7,
              "suppress_after_dismiss": true
            },
            "steps": [
              {
                "columns": [
                  {
                    "rows": [
                      {
                        "blocks": [
                          {
                            "type": "text",
                            "content": "<p>Get 10% off your first order</p>"
                          }
                        ]
                      },
                      {
                        "blocks": [
                          {
                            "type": "button",
                            "label": "Shop now",
                            "action": {
                              "type": "deeplink_to_screen",
                              "deeplink_url": "myapp://screen/shop"
                            }
                          }
                        ]
                      }
                    ]
                  }
                ]
              }
            ]
          }
        ]
      }
    }
  }
}
'
```

```json Response
{
  "data": {
    "type": "form",
    "id": "Ser5Vq",
    "attributes": {
      "status": "draft",
      "ab_test": false,
      "name": "Welcome offer",
      "created_at": "2026-10-22T15:50:35.794587+00:00",
      "updated_at": "2026-10-22T15:50:35.794606+00:00",
      "definition": {
        "type": "in-app",
        "versions": [
          {
            "form_type": "popup",
            "triggers": {
              "display_trigger": {
                "type": "app_open"
              },
              "delay_seconds": 5,
              "timeout_days": 7,
              "suppress_after_dismiss": true
            },
            "steps": [
              {
                "columns": [
                  {
                    "rows": [
                      {
                        "blocks": [
                          {
                            "type": "text",
                            "content": "<p>Get 10% off your first order</p>",
                            "styles": {
                              "padding": {
                                "left": 6,
                                "right": 6,
                                "top": 10,
                                "bottom": 10
                              },
                              "background_color": null
                            },
                            "id": "01M5J4X71KGDNK3R34WVM2ASKF"
                          }
                        ],
                        "id": "01M5J4X71G2B9E9XEZH6PNGFW9"
                      },
                      {
                        "blocks": [
                          {
                            "type": "button",
                            "label": "Shop now",
                            "action": {
                              "type": "deeplink_to_screen",
                              "deeplink_url": "myapp://screen/shop",
                              "deeplink_url_ios": null,
                              "deeplink_url_android": null,
                              "use_separate_deeplink_urls": null,
                              "web_url": null,
                              "id": "01M5J4X7207AX231JGK29DN5W1"
                            },
                            "styles": {
                              "background_color": null,
                              "padding": {
                                "left": 6,
                                "right": 6,
                                "top": 10,
                                "bottom": 10
                              },
                              "inner_padding": null,
                              "text_styles": {
                                "font_family": "Arial, 'Helvetica Neue', Helvetica, sans-serif",
                                "font_size": 16,
                                "font_weight": 700,
                                "text_color": "#FFFFFF",
                                "character_spacing": 0,
                                "font_style": null,
                                "text_decoration": null
                              },
                              "color": null,
                              "height": 50,
                              "width": "fill",
                              "border_styles": {
                                "radius": 2,
                                "color": null,
                                "style": null,
                                "thickness": null
                              },
                              "alignment": "center",
                              "drop_shadow": {
                                "enabled": false,
                                "color": "#000000",
                                "blur": 15,
                                "x_offset": 0,
                                "y_offset": 0
                              }
                            },
                            "id": "01M5J4X71X5YBRP8VFRKD27RVW"
                          }
                        ],
                        "id": "01M5J4X71T3XMX546HRB6SGCXW"
                      }
                    ],
                    "id": "01M5J4X71BRNERMH6R5QSVJNG0"
                  }
                ],
                "id": "01M5J4X715NF91ECHP9H6Z8S3S",
                "name": "Main"
              }
            ],
            "location": null,
            "targeting": null,
            "styles": {
              "width": "medium",
              "custom_width": null,
              "minimum_height": 250,
              "background_color": "#FFFFFF",
              "background_image": null,
              "overlay_color": "rgba(20,20,20,0.6)",
              "drop_shadow": {
                "enabled": false,
                "blur": 30,
                "color": "rgba(0,0,0,0.15)"
              },
              "border_styles": {
                "radius": 2,
                "color": "#000000",
                "style": null,
                "thickness": 0
              },
              "padding": {
                "left": 20,
                "right": 20,
                "top": 20,
                "bottom": 20
              },
              "margin": {
                "left": 0,
                "right": 0,
                "top": 0,
                "bottom": 0
              },
              "close_button": {
                "background_color": "rgba(180, 187, 195, 0.65)",
                "outline_color": "#FFFFFF",
                "color": "#FFFFFF",
                "stroke": 2.0,
                "size": 20,
                "margin": {
                  "left": 8,
                  "right": 8,
                  "top": 8,
                  "bottom": 8
                }
              },
              "custom_css": {
                "enabled": false,
                "css": ""
              }
            },
            "ab_test": false,
            "name": "Default",
            "id": 29155010,
            "status": "draft"
          }
        ]
      }
    },
    "links": {
      "self": "https://a.klaviyo.com/api/forms/Ser5Vq/"
    }
  },
  "links": {
    "self": "https://a.klaviyo.com/api/forms/"
  }
}
```

Keep the following in mind when you create an In-App form:

- Send exactly one version with exactly one step.
- Send your content in `steps[].columns`. A `columns` shorthand directly on the version isn't supported.
- Send `location` for a `flyout`, and omit it for other layouts. The `full` width style is only supported for a `flyout`.
- Send `ab_test` as `false` or omit it, both on the form and on the version.
- A static coupon `text` and a fixed countdown `end_time` can be `null` in a draft. A fixed countdown `end_time` must be in the future when you send it. Image blocks must have a complete image.
- Klaviyo names a new version `Default` and a new step `Main`. You can't set names when you create a form.
- If a request is invalid, the `400` error's `source.pointer` points to the field to fix, for example `/data/attributes/definition/versions/0/location`.

#### Create a Web form

To create a Web form, set the definition's `type` to `web` and put your existing `versions` next to it. Keep `ab_test` and `status` as top-level attributes. The following request creates a simple sign-up form with a sign-up step and a success step. A Web form version needs at least two steps. For a complete Web form body, see [Create a form](https://developers.klaviyo.com/en/reference/forms.md) in the Forms API overview.

```curl Request
curl --request POST \
     --url https://a.klaviyo.com/api/forms/ \
     --header 'Authorization: Klaviyo-API-Key your-private-api-key' \
     --header 'accept: application/vnd.api+json' \
     --header 'content-type: application/vnd.api+json' \
     --header 'revision: 2026-10-15.pre' \
     --data '
{
  "data": {
    "type": "form",
    "attributes": {
      "name": "My first API form",
      "status": "draft",
      "ab_test": false,
      "definition": {
        "type": "web",
        "versions": [
          {
            "steps": [
              {
                "columns": [
                  {
                    "rows": [
                      {
                        "blocks": [
                          {
                            "type": "html_text",
                            "properties": {
                              "content": "<div>Sign up for our newsletter</div>"
                            }
                          }
                        ]
                      },
                      {
                        "blocks": [
                          {
                            "type": "email",
                            "properties": {
                              "label": "Email",
                              "placeholder": "Enter your email address",
                              "required": true
                            }
                          }
                        ]
                      },
                      {
                        "blocks": [
                          {
                            "type": "button",
                            "properties": {
                              "label": "Sign up"
                            },
                            "action": {
                              "submit": true,
                              "type": "next_step",
                              "properties": {
                                "list_id": "{SOME_LIST_ID}"
                              }
                            }
                          }
                        ]
                      }
                    ]
                  }
                ],
                "name": "email sign-up"
              },
              {
                "columns": [
                  {
                    "rows": [
                      {
                        "blocks": [
                          {
                            "type": "html_text",
                            "properties": {
                              "content": "<div>Thank you for subscribing!</div>"
                            }
                          }
                        ]
                      }
                    ]
                  }
                ],
                "name": "success step"
              }
            ]
          }
        ]
      }
    }
  }
}
'
```

#### Move an existing Web form integration to the beta shape

If your integration already creates or reads Web forms at a `2026-10-15.pre` revision, make the following changes:

1. Add a `type` of `web` to `definition`, next to `versions`. The `definition` object you send has two keys, `type` and `versions`, where `versions` holds the same array you sent before.
2. Read `definition.type` and `definition.versions` from responses.
3. Leave `ab_test` and `status` where they are, as top-level attributes of the form.

Requests at `2026-10-15` and earlier revisions keep their existing shapes.

### Get a form

Retrieve a form with the [Get Form](https://developers.klaviyo.com/en/reference/get_form.md) endpoint. `GET /api/forms/{id}`

The response has the same shape as the Create Form response, with `definition.type` set to `web` or `in-app`.

For a Web form, `definition.type` is `web` and `versions` is unchanged from the [Forms API overview](https://developers.klaviyo.com/en/reference/forms.md). The following response is trimmed to a single text block to show the new `type` field. A real response includes all of the version's default properties and styles.

```json Response
{
  "data": {
    "type": "form",
    "id": "Ser5Vq",
    "attributes": {
      "status": "draft",
      "ab_test": false,
      "name": "My first API form",
      "created_at": "2026-10-22T15:59:04+00:00",
      "updated_at": "2026-10-22T15:59:04+00:00",
      "definition": {
        "type": "web",
        "versions": [
          {
            "id": 29155217,
            "type": "popup",
            "channel": "WEB",
            "status": "draft",
            "ab_test": false,
            "steps": [
              {
                "id": "01JTP6F3EERYR2T30C4ZDCS6JA",
                "columns": [
                  {
                    "id": "01JTP6F3EQ9TQ6TEWQSV33JDQ7",
                    "rows": [
                      {
                        "id": "01JTP6F3EZRM5M0HM42NPC6QA5",
                        "blocks": [
                          {
                            "id": "01JTP6F3F52N3WXF6MNNSH1MQ4",
                            "type": "html_text",
                            "properties": {
                              "content": "<div>Sign up for our newsletter</div>"
                            }
                          }
                        ]
                      }
                    ]
                  }
                ]
              }
            ]
          }
        ]
      }
    },
    "links": {
      "self": "https://a.klaviyo.com/api/forms/Ser5Vq"
    }
  }
}
```

### Get forms

List the forms in your account with the [Get Forms](https://developers.klaviyo.com/en/reference/get_forms.md) endpoint. `GET /api/forms/`

At this revision, the list includes both Web and In-App forms, each with its `definition`. To list only one kind, filter on `channel_type`:

```curl Request
curl --request GET \
     --url 'https://a.klaviyo.com/api/forms/?filter=equals(channel_type,"in-app")' \
     --header 'Authorization: Klaviyo-API-Key your-private-api-key' \
     --header 'accept: application/vnd.api+json' \
     --header 'revision: 2026-10-15.pre'
```

The `channel_type` filter accepts `web` or `in-app` with the `equals` operator. Any other value returns a `400` error.

### Update a form

Edit a form's draft with the [Update Form](https://developers.klaviyo.com/en/reference/update_form.md) endpoint. `PATCH /api/forms/{id}`

You can update a form's `name` and `definition`. Attributes you omit keep their current values. Neither can be `null`. Any other attribute, such as `status` or `ab_test`, returns a `400` error that points to the field.

When you send a `definition`, it replaces the editable definition entirely, so use the same workflow as the [Forms API overview](https://developers.klaviyo.com/en/reference/forms.md):

1. Retrieve the form with `GET /api/forms/{id}`.
2. Modify the draft versions in the returned definition. Keep every version and its `id`.
3. Send the full definition in your Update Form request.

The following rules apply to updates:

- The definition's `type` can't change, for either Web or In-App forms. Send the same `type` that Get Form returned. Changing it returns a `400` error that points to `definition/type`.
- Send each existing version `id` exactly once. You can't add or remove versions. If a live form has a `live` and a `draft` version, send both.
- You can only edit draft versions. Return each live version exactly as you received it. Changing a live version returns a `400` error.
- Anything you leave out of a draft version, such as a block or a row, is deleted from the form. This applies to both Web and In-App forms.
- Update Form doesn't check whether the form changed since you retrieved it. If you send a definition from an earlier Get Form call, it can overwrite edits made in the meantime. Retrieve the form again right before you update it.

The following request renames a form and leaves its definition as it is:

```curl Request
curl --request PATCH \
     --url https://a.klaviyo.com/api/forms/Ser5Vq \
     --header 'Authorization: Klaviyo-API-Key your-private-api-key' \
     --header 'accept: application/vnd.api+json' \
     --header 'content-type: application/vnd.api+json' \
     --header 'revision: 2026-10-15.pre' \
     --data '
{
  "data": {
    "type": "form",
    "id": "Ser5Vq",
    "attributes": {
      "name": "Welcome offer (renamed)"
    }
  }
}
'
```

The following request changes the text of the In-App popup from [Create an In-App form](#create-an-in-app-form) to "Get 15% off your first order". It sends the whole definition, with the version, step, column, row, and block IDs that Get Form returned, and with only the text block's `content` changed:

```curl Request
curl --request PATCH \
     --url https://a.klaviyo.com/api/forms/Ser5Vq \
     --header 'Authorization: Klaviyo-API-Key your-private-api-key' \
     --header 'accept: application/vnd.api+json' \
     --header 'content-type: application/vnd.api+json' \
     --header 'revision: 2026-10-15.pre' \
     --data '
{
  "data": {
    "type": "form",
    "id": "Ser5Vq",
    "attributes": {
      "definition": {
        "type": "in-app",
        "versions": [
          {
            "form_type": "popup",
            "triggers": {
              "display_trigger": {
                "type": "app_open"
              },
              "delay_seconds": 5,
              "timeout_days": 7,
              "suppress_after_dismiss": true
            },
            "steps": [
              {
                "columns": [
                  {
                    "rows": [
                      {
                        "blocks": [
                          {
                            "type": "text",
                            "content": "<p>Get 15% off your first order</p>",
                            "styles": {
                              "padding": {
                                "left": 6,
                                "right": 6,
                                "top": 10,
                                "bottom": 10
                              },
                              "background_color": null
                            },
                            "id": "01M5J4X71KGDNK3R34WVM2ASKF"
                          }
                        ],
                        "id": "01M5J4X71G2B9E9XEZH6PNGFW9"
                      },
                      {
                        "blocks": [
                          {
                            "type": "button",
                            "label": "Shop now",
                            "action": {
                              "type": "deeplink_to_screen",
                              "deeplink_url": "myapp://screen/shop",
                              "deeplink_url_ios": null,
                              "deeplink_url_android": null,
                              "use_separate_deeplink_urls": null,
                              "web_url": null,
                              "id": "01M5J4X7207AX231JGK29DN5W1"
                            },
                            "styles": {
                              "background_color": null,
                              "padding": {
                                "left": 6,
                                "right": 6,
                                "top": 10,
                                "bottom": 10
                              },
                              "inner_padding": null,
                              "text_styles": {
                                "font_family": "Arial, 'Helvetica Neue', Helvetica, sans-serif",
                                "font_size": 16,
                                "font_weight": 700,
                                "text_color": "#FFFFFF",
                                "character_spacing": 0,
                                "font_style": null,
                                "text_decoration": null
                              },
                              "color": null,
                              "height": 50,
                              "width": "fill",
                              "border_styles": {
                                "radius": 2,
                                "color": null,
                                "style": null,
                                "thickness": null
                              },
                              "alignment": "center",
                              "drop_shadow": {
                                "enabled": false,
                                "color": "#000000",
                                "blur": 15,
                                "x_offset": 0,
                                "y_offset": 0
                              }
                            },
                            "id": "01M5J4X71X5YBRP8VFRKD27RVW"
                          }
                        ],
                        "id": "01M5J4X71T3XMX546HRB6SGCXW"
                      }
                    ],
                    "id": "01M5J4X71BRNERMH6R5QSVJNG0"
                  }
                ],
                "id": "01M5J4X715NF91ECHP9H6Z8S3S",
                "name": "Main"
              }
            ],
            "location": null,
            "targeting": null,
            "styles": {
              "width": "medium",
              "custom_width": null,
              "minimum_height": 250,
              "background_color": "#FFFFFF",
              "background_image": null,
              "overlay_color": "rgba(20,20,20,0.6)",
              "drop_shadow": {
                "enabled": false,
                "blur": 30,
                "color": "rgba(0,0,0,0.15)"
              },
              "border_styles": {
                "radius": 2,
                "color": "#000000",
                "style": null,
                "thickness": 0
              },
              "padding": {
                "left": 20,
                "right": 20,
                "top": 20,
                "bottom": 20
              },
              "margin": {
                "left": 0,
                "right": 0,
                "top": 0,
                "bottom": 0
              },
              "close_button": {
                "background_color": "rgba(180, 187, 195, 0.65)",
                "outline_color": "#FFFFFF",
                "color": "#FFFFFF",
                "stroke": 2.0,
                "size": 20,
                "margin": {
                  "left": 8,
                  "right": 8,
                  "top": 8,
                  "bottom": 8
                }
              },
              "custom_css": {
                "enabled": false,
                "css": ""
              }
            },
            "ab_test": false,
            "name": "Default",
            "id": 29155010,
            "status": "draft"
          }
        ]
      }
    }
  }
}
'
```

A successful request returns a `200` and the updated form, in the same shape as the Get Form response.

Your changes stay in draft until you publish the form.

### Publish and unpublish a form

Publish a form's draft version with the [Publish Form](https://developers.klaviyo.com/en/reference/publish_form.md) endpoint, and take a live form down with the [Unpublish Form](https://developers.klaviyo.com/en/reference/unpublish_form.md) endpoint. Both endpoints work for Web and In-App forms. Their request and response behavior is described in the [Forms API overview](https://developers.klaviyo.com/en/reference/forms.md).

```curl Request
curl --request POST \
     --url https://a.klaviyo.com/api/form-publish-jobs/ \
     --header 'Authorization: Klaviyo-API-Key your-private-api-key' \
     --header 'accept: application/vnd.api+json' \
     --header 'content-type: application/vnd.api+json' \
     --header 'revision: 2026-10-15.pre' \
     --data '
{
  "data": {
    "type": "form-publish-job",
    "relationships": {
      "form": {
        "data": {
          "type": "form",
          "id": "Ser5Vq"
        }
      }
    }
  }
}
'
```

To unpublish, send the same request body to `POST /api/form-unpublish-jobs/` with the type `form-unpublish-job`.

Keep the following in mind for In-App forms:

- After you publish an In-App form, Get Form returns two versions: the `live` version and a `draft` version. You edit the draft version, and the live version stays unchanged until you publish again.
- After you unpublish, the form returns to `draft` and only the draft version remains.
- Unpublishing a form that isn't live succeeds without making changes, so you can safely retry it.
- The response contains a job ID, but you can't retrieve the job. Call Get Form to confirm the form's `status`.

### Next steps

- Create a form with the [Create Form endpoint](https://developers.klaviyo.com/en/reference/create_form.md).
- Make a call to [Get Form](https://developers.klaviyo.com/en/reference/get_form.md) to retrieve the newly created form.
- Edit the draft with [Update Form](https://developers.klaviyo.com/en/reference/update_form.md).
- Make the form live with [Publish Form](https://developers.klaviyo.com/en/reference/publish_form.md), or take it down with [Unpublish Form](https://developers.klaviyo.com/en/reference/unpublish_form.md).

### Additional resources

- <a href="https://help.klaviyo.com/hc/en-us/articles/360026474752" target="_blank">Getting started with forms</a>
- <a href="https://academy.klaviyo.com/en-us/courses/create-strategic-sign-up-forms" target="_blank">Learn how to create strategic sign-up forms</a>

## Endpoints

- [Get Forms](https://developers.klaviyo.com/en/v2025-10-15/reference/get_forms.md): `GET /api/forms`
- [Get Form](https://developers.klaviyo.com/en/v2025-10-15/reference/get_form.md): `GET /api/forms/{id}`
- [Create Form](https://developers.klaviyo.com/en/v2025-10-15/reference/create_form.md): `POST /api/forms`
- [Delete Form](https://developers.klaviyo.com/en/v2025-10-15/reference/delete_form.md): `DELETE /api/forms/{id}`
- [Get Form Version](https://developers.klaviyo.com/en/v2025-10-15/reference/get_form_version.md): `GET /api/form-versions/{id}`
- [Get Versions for Form](https://developers.klaviyo.com/en/v2025-10-15/reference/get_versions_for_form.md): `GET /api/forms/{id}/form-versions`
- [Get Version IDs for Form](https://developers.klaviyo.com/en/v2025-10-15/reference/get_version_ids_for_form.md): `GET /api/forms/{id}/relationships/form-versions`
- [Get Form for Form Version](https://developers.klaviyo.com/en/v2025-10-15/reference/get_form_for_form_version.md): `GET /api/form-versions/{id}/form`
- [Get Form ID for Form Version](https://developers.klaviyo.com/en/v2025-10-15/reference/get_form_id_for_form_version.md): `GET /api/form-versions/{id}/relationships/form`
