Help needed for public API (

Hey dear community,

I am pretty new in developing frappe apps and in developing in general.
I tried to set up an public API that I call from JavaScript using
But somehow, the desired function in is not being executed.

Here is my code:


function do_somehting(){{
	method: "custom_app.api.some_function",
	callback: (response) => {


Code in custom_app/

import frappe

def some_function():
    doc = frappe.get_doc({
	"doctype": "Project",
	"title": "My new project",
	"status": "Open"

I clicked the button that was linked to the JS-function, but now there is no new project in my database. Am I missing something fundamental here?

Any help is very much appreciated.

Thank you and have a nice day,

Found a solution in this post.
I needed to do bench restart to make the whitelisted function work.

The Topic can be closed now :smiley: