# API Workflow

> API Workflow node for invoking a published UiPath Studio Web API workflow and using its output, with its configuration fields and output variables.

Invokes a UiPath Studio Web API workflow and returns its output.

## When to use API Workflow vs HTTP Request

Use the **API Workflow** node when the logic you need to call is built in Studio Web and published as an API workflow — for example, structured data processing or multi-step integrations authored by your team. Use the **HTTP Request** node when you are calling any external Representational State Transfer (REST) endpoint outside the UiPath Platform.

## Configuration

| Field | Required | Description |
|---|---|---|
| **API workflow** | Yes | The Studio Web API workflow to invoke. Select from the list of published API workflows in your organization. |
| **Input** | No | Key-value pairs mapped to the API workflow's input parameters. Supports variable references. |
| **Timeout** | No | Maximum time to wait for the workflow to complete. |

## Output variables

| Variable | Description |
|---|---|
| `output` | The response returned by the API workflow, according to its output schema. |
| `error` | Error details when the call fails. Use it with [error handling](flow-error-handling.md) to branch on failures. |

## Examples

Reference the API workflow's output downstream with an expression:

```
$vars.apiWorkflow1.output
```

To use a single field from the output, append the field name defined by the API workflow's output schema — for example, `$vars.apiWorkflow1.output.<field>`.

## Common issues

| Issue | Resolution |
|---|---|
| API workflow not listed in the dropdown | Ensure the workflow is published in Studio Web and you have permission to invoke it. |
| Timeout error | Increase the Timeout value or optimize the Studio Web workflow for faster execution. |
| Input type mismatch | Check that the variable types you are passing match the API workflow's declared input parameter types. |
