> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://fyno.io/docs/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://fyno.io/docs/_mcp/server.

# Call an API Widget

> Learn how to configure the Call an API widget in workflows by selecting allow-listed endpoints, configuring request methods, content types, query parameters, headers, and simplifying API responses for downstream workflow processing.

The **Call an API** widget allows workflows to make outbound API requests using verified allow-listed endpoints. This widget can be used to fetch external data, trigger third-party services, or process workflow payloads dynamically.

The widget contains two primary sections:

* **Request** — Configure the outbound API request
* **Response** — Configure and simplify the API response payload

## Steps to configure Call an API Widget

Drag and drop the **Call an API** widget into the workflow and connect it to the required workflow step.

Configure the **Request** section.

This section is used to define the API endpoint and request configuration.

Select the **Allowlist URL**.

Choose the verified allow-listed endpoint that should be called from the workflow.

| Field         | Description                                          |
| ------------- | ---------------------------------------------------- |
| Allowlist URL | Verified endpoint configured for outbound API calls. |

Select the **HTTP Method**.

This defines the type of API request that will be executed.

Supported methods may include:

* GET
* POST
* PUT
* PATCH
* DELETE

| Field       | Description                                               |
| ----------- | --------------------------------------------------------- |
| HTTP Method | Defines the request operation used while calling the API. |

Configure the **Content Type**.

The content type determines the format of the request payload being sent to the API.

Common content types include:

* None
* application/json
* form-data
* x-www-form-urlencoded

| Field        | Description                                         |
| ------------ | --------------------------------------------------- |
| Content Type | Defines the payload format used in the API request. |

Configure **Query Parameters** (Optional).

Query parameters are appended to the API URL and are typically used for filtering, searching, or passing request-specific values.

Example:

```json
{
  "userId": "$input.user.id"
}
```

| Field            | Description                                  |
| ---------------- | -------------------------------------------- |
| Query Parameters | Key-value pairs appended to the request URL. |

Configure **Headers** (Optional).

Headers are used to send additional metadata with the API request.

Common examples include:

* Authorization tokens
* API keys
* Custom request headers

Example:

```json
{
  "Authorization": "Bearer <token>"
}
```

| Field   | Description                                          |
| ------- | ---------------------------------------------------- |
| Headers | Additional metadata sent along with the API request. |

Configure the **Response** section.

The Response section allows users to add a sample API response payload and simplify it using the payload mapper.

Users can provide response data in:

* JSON format
* FORM format

Use the **Simplify** option to flatten and simplify nested API response payloads for easier mapping within workflows.

Example Response:

```json
{
  "user": {
    "id": 101,
    "name": "John Doe"
  }
}
```

Simplified Output:

```json
{
  "user.id": 101,
  "user.name": "John Doe"
}
```

> **Note**
>
> Only verified allow-listed URLs can be used inside the Call an API widget. Ensure the endpoint is configured before creating the workflow.