--- title: "Execute the Function" url: https://docs.catalyst.zoho.com/en/sdk/web/v4/serverless/functions/execute-function/ description: "Catalyst functions enable you to build custom functionalities in your application, automate tasks, or integrate with third-party services." last_updated: 2026-09-08T11:07:33Z service: Serverless type: general related_links: - name: "Functions" url: /en/serverless/help/functions/introduction - name: "Function - API" url: /en/api/code-reference/serverless/functions/execute-function/#ExecuteFunction --- # Execute the Function > **Note:** This SDK is currently in deprecation. Migrate to [JavaScript SDK](https://docs.catalyst.zoho.com/en/sdk/javascript/v1/serverless/functions/execute-function/) now. A function can be executed by calling the execute() method in which the configuration (of type JSON) is passed as a parameter. The **function** object used in the code snippet is the [function object](https://docs.catalyst.zoho.com/en/sdk/web/v4/serverless/functions/get-function-object). ### Create a Function Configuration Before executing a function, it is mandatory to set the configuration required for it. Here, the configuration specifies, the function arguments(as **args**) if any. ```javascript //Create the config object used to execute the function. //The args is an JSONObject to pass values to the function as parameters. var config = { "args": {"name": "xxx"}, "method":"GET" }; ``` The supported HTTP methods are: GET, PUT, POST, PATCH, and DELETE. The GET method is the default. If you use GET in your code, the function arguments are passed as query strings. If you use any of the other HTTP methods, the function arguments are passed in the request body. ### Execute Function The function can be executed by passing the **configuration** object as an argument to the *execute()* method. > The promise returned here will be resolved to an object in which the **content** key contains the output of the executed function. ```javascript //Execute the function by passing the config object var functions = catalyst.function; var functionObject = functions.functionId(FUNCTION_NAME); //can pass Function Id or Function Name as argument var functionPromise = functionObject.execute(config); functionPromise .then((response) => { response.json().then(responseBody => { console.log(responseBody); }); }) .catch((err) => { console.log(err); }); ```