Components in Rich Text
Rich Text field values are HTML strings that can contain Webflow component instances, serialized as <wf-component> custom-element markup. On read, an instance appears inline in the field’s HTML; on write, the same markup creates or updates the instance.
Markup at a glance
A component instance is a <wf-component> element that carries the component’s identity and its property values:
component-id and each prop-<propId> are specific to your site’s component definitions. See Finding component and property IDs below.
Reading components
When you GET a CMS item, any component instances in a Rich Text field are returned inline as <wf-component> markup within the field’s HTML string. You can reuse that markup as the basis for a later write.
$ curl https://api.webflow.com/v2/collections/:collection_id/items/:item_id \ > -H "Authorization: Bearer <token>"
Writing components
On POST and PATCH, the <wf-component> markup you send in a Rich Text field is what creates or updates the instance:
- Create a new instance by including
<wf-component>markup without adata-w-id— the server assigns one. - Update an existing instance by keeping its returned
data-w-id. - Set scalar props as
prop-<propId>attributes; set text/rich-text props as nested<wf-prop name="<propId>" type="…">children.
$ curl https://api.webflow.com/v2/collections/:collection_id/items \ > -H "Authorization: Bearer <token>"
$ curl https://api.webflow.com/v2/collections/:collection_id/items/:item_id \ > -H "Authorization: Bearer <token>"
Finding component and property IDs
component-id and prop-<propId> values come from your site’s component definitions. To look them up:
- List the site’s components to get each
component-id:GET/v2/sites/:site_id/components$ curl https://api.webflow.com/v2/sites/:site_id/components \ > -H "Authorization: Bearer <token>" - List a component’s properties to get each
prop-<propId>:GET/v2/sites/:site_id/components/:component_id/properties$ curl https://api.webflow.com/v2/sites/:site_id/components/:component_id/properties \ > -H "Authorization: Bearer <token>" - Or
GETan item that already contains the component and reuse the returned<wf-component>markup.
Constraints
A write is rejected with a 400 when the Rich Text contains a component that:
The write is rejected as a whole — no partial writes.