# HTTP API

### Overview

The Call API integration allows you to make HTTP requests to any external API directly from a Decimal workflow. It acts as a universal connector when a native integration is not available or when you need full control over request structure.

This integration is commonly used to:

* Connect third-party services
* Fetch or push data to external systems
* Trigger internal or external workflows
* Extend Decimal beyond prebuilt integrations

Call API works as a workflow node and can be combined with logic, variables, and transformation nodes.

***

### Available Module

#### Call API

Makes an HTTP request to a specified URL using standard HTTP methods and stores the response in a workflow variable.

Supported request types include:

* GET
* POST
* PUT
* PATCH
* DELETE

***

### When to Use Call API

Use Call API when:

* A native integration does not exist
* You need custom headers or authentication
* You are building flexible or experimental workflows<br>

For common or repeated use cases, native integrations are recommended where available.

***

### Adding Call API to a Workflow

1. Open the Decimal workflow editor
2. Add a Trigger node
3. From Integration, select Call API
4. Connect the Call API node to your trigger\ <br>

Once added, the Call API Settings panel opens automatically.

![](/files/GAAmy5lkiAJ8aHPoom6a)

***

### Module Configuration

#### HTTP Method

Select the HTTP method for the request.

Supported options:

* GET – Fetch data
* POST – Send data
* PUT – Update data
* PATCH – Partially update data
* DELETE – Remove data<br>

Choose the method based on the API you are calling.

***

#### URL

Enter the full endpoint URL for the request.

**Example**:

*<https://api.example.com/data>*

This field is required.\
If left empty, the node will not execute.

***

#### Headers

Headers allow you to pass metadata and authentication information with the request.

**Default Header**

* Content-Type: application/json

This header is enabled by default and can be modified or removed if needed.

**Optional Headers**

* Authorization – Commonly used for API keys or Bearer tokens
* User-Agent – Used by some APIs for request identification\ <br>

You can:

* Enable or disable headers using the checkbox
* Edit header values
* Remove headers using the ❌ icon
* Add additional headers using + Add Header

***

#### Request Body

The request body is used for:

* POST
* PUT
* PATCH

Enter a valid JSON payload.

**Example**:

<mark style="color:$primary;">{</mark>

&#x20; <mark style="color:$primary;">"key": "value"</mark>

<mark style="color:$primary;">}</mark>

For GET requests, the request body is ignored.

![](/files/gqPwSWVeEuoXU4SjdTRs)

***

#### Result Variable Name

Define the variable name that will store the HTTP response.

Default example:

*httpResult*

This variable becomes available to all downstream nodes in the workflow.

***

### Output & Variables

After execution, the response from the API is stored under the specified result variable.

Typical response data includes:

* Status code
* Response body
* Headers (if supported)\ <br>

**Example usage in downstream nodes:**

*httpResult.body*

*httpResult.status*

This data can be:

* Passed to logic nodes (If Else)
* Transformed using Run Code
* Stored using Set Variable
* Used to trigger further actions

***

### Example Workflow

Use Case: Fetch data from an external API and process it.

Workflow:

1. Trigger
2. Call API
3. If Else (check response)
4. Run Code or Set Variable

This allows you to build API-driven workflows without external services or scripts.

<br>


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://wiki.decimal.at/technical/node-directory/http-api.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
