Create an API endpoint with custom code and functions

API toolRecipe ToolsDeveloper ToolMarketing

What it does

When someone makes a new API request to this endpoint, this automation executes custom code and calls a function to process the request. The response is returned in real time so the caller gets the result immediately.

Who it's for

Engineering teams who need to build APIs without writing standalone services.

How teams use this

Build a data transformation API

Create an endpoint that accepts raw data, transforms it with custom code, and returns the formatted result. Teams can call this API from any application without duplicating the transformation logic.

Expose internal business logic as an API

Use functions to wrap existing automation logic and expose it as an API endpoint. Other teams and systems can now call that logic directly without building their own integration.

Add authentication and validation to the endpoint

Include custom code to validate API keys, check request signatures, or enforce rate limits before the function runs. Only authorized callers can access the endpoint.

How it works

  1. Receive the API request. Define the request and response parameters for this API endpoint so callers know what to send and what they will receive back.
  2. Run custom code. Execute ruby code in Workato Custom Code to process the request data, transform it, or prepare it for the next step in the flow.
  3. Call a function. Invoke a reusable function in Workato Recipe Function to handle business logic, fetch data, or perform operations that the API needs.
  4. Return the response. Send the processed output back to the API caller so they receive the result of the request.