--- title: "Execute a Function" url: https://docs.catalyst.zoho.com/en/sdk/ios/v2/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: 2025-11-19T15:07:41Z service: Serverless type: general related_links: - name: "Functiona" url: /en/serverless/help/functions/introduction - name: "Implementing Functions" url: /en/serverless/help/functions/implementation - name: "Execute Function - API" url: /en/api/code-reference/serverless/functions/execute-function/#ExecuteFunction --- # Execute a Function You can execute a [Catalyst function](https://docs.catalyst.zoho.com/en/serverless/help/functions/introduction) in any one of the ways given below, based on the HTTP request you pass with the function. You can pass the parameters to the function to be executed as the argument to a function execution method. This method differs for each HTTP request type. > **Note**: You can create six types of functions in Catalyst: Basic I/O, Advanced I/O, Cron, Integration, Event, and BrowserLogic functions. However, you can only execute Basic I/O functions in Catalyst iOS SDK. The `<FUNCTION_INSTANCE>` used in all the code sections below is the instance defined in the [Function Instance page](https://docs.catalyst.zoho.com/en/sdk/ios/v2/serverless/functions/create-function-instance). ### Execute a GET function You can execute a function of the HTTP GET type by passing the parameters to the `executeGet()` method: ```bash <FUNCTION_INSTANCE>.executeGet( parameters params : [ String : Any ]? = nil, completion : @escaping( Result< String, ZCatalystError > ) -> Void ) ``` **Parameters**: * `params`: The parameters to be passed to the function as a Hash map A sample code snippet is shown below: ```bash ZCatalystApp.shared.getFunctionInstance(id: 2823000000097020).executeGet() //Replace this with your function ID { result in switch result { case .success(let output) : print("GET function executed successfully - \( output )") case .error(let error) : print("GET function failed to execute - \( error )") } } ``` ### Execute a PUT function You can execute a function of the HTTP PUT type, by passing the parameters to the `executePut()` method as a Hash map. You can pass the payload in the PUT request to this method as a Hash map argument as well: ```bash <FUNCTION_INSTANCE>.executePut( parameters params : [ String : Any ]? = nil, body : [ String : Any ]? = nil, completion : @escaping( Result< String, ZCatalystError > ) -> Void ) ``` **Parameters**: * `params`: The parameters to be passed to the function as a Hash map * `body`: The data payload to be passed as a Hash map A sample code snippet is shown below: ```bash var params : [ String : Any ] = [:] params[ "ROWID" ] = "2823000000098012" params[ "Category" ] = "Important" ZCatalystApp.shared.getFunctionInstance(id: 2823000000097020).executePut(parameters: params) //Replace this with your function ID { result in switch result { case .success(let output) : print("PUT function executed successfully - \( output )") case .error(let error) : print("PUT function failed to execute - \( error )") } } ``` ### Execute a POST function You can execute a function of the HTTP POST type, by passing the parameters to the `executePOST()` method as a Hash map. You can pass the payload in the POST request to this method as a Hash map argument as well: ```bash <FUNCTION_INSTANCE>.executePost( parameters params : [ String : Any ]? = nil, body : [ String : Any ]? = nil, completion : @escaping( Result< String, ZCatalystError > ) -> Void ) ``` **Parameters**: * `params`: The parameters to be passed to the function as a Hash map * `body`: The data payload to be passed as a Hash map A sample code snippet is shown below: ```bash var params : [ String : Any ] = [:] params[ "Title" ] = "Data Migration Tasks" params[ "Category" ] = "Official" ZCatalystApp.shared.getFunctionInstance(id: 2823000000097020).executePost(parameters: ) //Replace this with your function ID { result in switch result { case .success(let output) : print("POST function executed successfully - \( output )") case .error(let error) : print("POST function failed to execute - \( error )") } } ```