Headless Optimizely Forms
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.

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:

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.
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:
- Set up the headless Optimizely Forms API on your CMS site.
- Look up classes and models in the JavaScript SDK reference for headless Optimizely Forms.