You are free to build/create a specific web api project, and in near ALL cases, one is free to simple add web API (end points) to an existing WebForms site.
You can create a 100% separate web method page (a asmx page), or you can even add web methods to existing web pages. So, say this web page and a web method (that is a API web end point).
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
End Sub
<WebMethod>
Public Shared Function MyHello() As String
Return "Hello World"
End Function
So, the above web method? it will support a SOAP call (xml), a REST call, or better yet, a standard ajax call (and without any changes also supports JSON). So, in the markup, we can have this (we assume you have jQuery installed).
<asp:Button ID="cmdTest" runat="server" Text="Web API test"
OnClientClick="endpointtest();return false;"
/>
<script>
function endpointtest() {
$.ajax({
url: "TestAPI.aspx/MyHello",
dataType: "json",
type: "POST",
contentType: "application/json; charset=utf-8",
data: {},
success: function (data) {
alert("return value = " + data.d)
},
failure: function (rData) {
alert("error " + rData.d);
}
});
}
</script>
So there is little stopping you from adding web endpoints to a existing webforms site, and there is full support as such.
Above when run results in this: