Could we call built in API to submit Form instead create custom API?

2025/10/30 9:45 AM

In Kentico 12, I remember I can call this built in API to submit Form(this is built in API in Kentico 12 /KenticoFormWidget/FormSubmit?formName=<Formname>).

but in XbyK I see some new field, so I can't use that API anymore, so could we have any example to call built in API in XbyK?


Environment

  • Xperience by Kentico version: 30.10.0

  • .NET version: 8

Answers

2025/10/30 11:17 AM

Not sure what your exact scenario is, so I’ll try to do my best here. There is a backend API you can use for creating a new form submission. To use it, you need to pass the data from the front-end form to the backend, which means you need to create a layer that fits your scenario. For example, this could be a custom controller acting as a REST API endpoint that accepts the form data and hands it over to the backend logic.

If you’re looking for a REST API already built into the product that directly submits form data, I doubt there is anything like it. The Form widget does expose an endpoint like:

/Kentico.Components/en-US/Kentico.FormWidget/KenticoFormWidget/FormSubmit?formName=<form-name>&…

However, this endpoint is antiforgery / CSRF protected for good reasons, so you cannot call it directly on its own.

To response this discussion, you have to login first.