---
title: Headless Optimizely Forms
slug: cms-13/docs/headless-optimizely-forms
createdAt: 2026-11-04T00:00:00.000Z
---

Headless Optimizely Forms lets a decoupled front end display and submit forms that editors build in Optimizely Content Management System (CMS) 13. Editors keep building forms in CMS, and the front-end app renders them with any framework. Use it when your site front end runs separately from CMS, such as a React or Next.js app.

Headless Optimizely Forms for CMS 13 requires the following packages:

- `Optimizely.Cms.Forms.Service` 2.0.0 or later – REST API that serves form data and accepts submissions. It targets .NET 10 and Optimizely Forms 6.
- `EPiServer.OpenIDConnect` 13 – Issues the access tokens that the API requires for submissions.
- `@episerver/forms-sdk` – Optional JavaScript SDK with form models, an API client, validators, and step helpers.
- `@episerver/forms-react` – Optional React components that render a form from the API response.

## Headless architecture

In a headless setup, CMS acts as the management site where editors create and publish forms. CMS stores the form data. A separate front-end site requests the data from the API, renders the form, and sends visitor input back to the API.

![Diagram of the headless Optimizely Forms architecture where the CMS management site serves form data to a decoupled front-end site](https://api.archbee.com/api/optimize/BrbvVORKJ5iIeSMZye5kI/T21JtlwdbB0IElfMkAokT_headless-optimizely-forms-architecture.png)

## Forms REST API

The `Optimizely.Cms.Forms.Service` package adds REST endpoints under `/_forms/v1` to your CMS site. The endpoints cover the full form flow:

- **Get a form** – Returns the form structure, element properties, validators, and localized text. This endpoint does not require authentication.
- **Submit a form** – Saves visitor input for single-step and multi-step forms, including file uploads. This endpoint requires an OpenID Connect (OIDC) access token.
- **Get or list submissions** – Returns submitted data for a form. These endpoints require an access token for a user who has permission to view form submissions.

The following Swagger UI screenshot lists the API endpoints and data models:

![Screenshot of Swagger UI where the Forms REST API lists its endpoints to get a form, submit a form, get a submission, and list submissions](https://api.archbee.com/api/optimize/BrbvVORKJ5iIeSMZye5kI/OJLpxaLs2vuihcFI_Oji4_81d8f47-image.png)

## JavaScript SDK

The JavaScript SDK has two packages. Use `@episerver/forms-sdk` with any framework. Add `@episerver/forms-react` when your front end uses React.

- `@episerver/forms-sdk` – Defines the form, element, and validator models. Includes clients that load and submit forms, and helpers for validation, conditions, and steps.
- `@episerver/forms-react` – Provides React components, such as `Form` and `FormContainerBlock`, that render a form and its elements as HTML.

:::hint{type="info"}
**Note**
Headless Optimizely Forms 2.0.0 does not include the `Optimizely.Cms.Forms.ContentGraph` package. To display forms on a CMS 13 site, call the Forms REST API instead of querying Optimizely Graph.
:::

## Get started

Set up headless forms in the following order:

1. [Set up the headless Optimizely Forms API](https://docs.optimizely.com/cms-13/docs/set-up-headless-optimizely-forms-api) on your CMS site.
2. [Render headless Optimizely Forms in a React app](https://docs.optimizely.com/cms-13/docs/install-headless-optimizely-forms-javascript-sdk-for-the-client-app).
3. Look up classes and models in the [JavaScript SDK reference for headless Optimizely Forms](https://docs.optimizely.com/cms-13/docs/javascript-sdk-for-headless-optimizely-forms).
