> ## Documentation Index
> Fetch the complete documentation index at: https://docs.oration.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# API Call

> Make HTTP requests to external APIs

The **API Call** node sends an HTTP request to an external API and stores the response for use in downstream nodes.

## Behavior

* Sends an HTTP request with the configured method, headers, body, and authentication
* Retries on failure up to the configured retry count
* Stores response body, status code, and headers as output variables
* Routes to `Success`, `Error`, or `Timeout` based on the outcome

## Configuration

### Request

| Parameter     | Type   | Default | Options                                                    | Description                                                |
| ------------- | ------ | ------- | ---------------------------------------------------------- | ---------------------------------------------------------- |
| `url`         | string | `""`    | —                                                          | API endpoint URL. Supports `{{variable}}` interpolation.   |
| `method`      | enum   | `"GET"` | `GET`, `POST`, `PUT`, `PATCH`, `DELETE`, `HEAD`, `OPTIONS` | HTTP method                                                |
| `requestBody` | string | `""`    | —                                                          | JSON body template. Supports `{{variable}}` interpolation. |
| `headers`     | object | `{}`    | —                                                          | Request headers as key-value pairs                         |

### Authentication

| Parameter         | Type   | Default | Options                        | Description                         |
| ----------------- | ------ | ------- | ------------------------------ | ----------------------------------- |
| `authType`        | enum   | `null`  | `bearer`, `basic`, `x-api-key` | Authentication type                 |
| `authCredentials` | string | `""`    | —                              | Auth token, credentials, or API key |
| `username`        | string | `null`  | —                              | Username for basic auth             |
| `password`        | string | `null`  | —                              | Password for basic auth             |

### Reliability

| Parameter | Type   | Default | Range        | Description                         |
| --------- | ------ | ------- | ------------ | ----------------------------------- |
| `timeout` | number | `10000` | 1,000–60,000 | Request timeout in milliseconds     |
| `retries` | number | `2`     | 0–5          | Number of retry attempts on failure |

## Output handles

| Handle      | Description                                    |
| ----------- | ---------------------------------------------- |
| **Success** | Request returned a successful response (2xx)   |
| **Error**   | Request failed (non-2xx status, network error) |
| **Timeout** | Request exceeded the configured timeout        |

## Output variables

| Variable      | Type   | Description                             |
| ------------- | ------ | --------------------------------------- |
| `body`        | any    | Response body (parsed JSON or raw text) |
| `status_code` | number | HTTP response status code               |
| `headers`     | object | Response headers as key-value pairs     |

## Example

Look up a customer by phone number:

```json theme={null}
{
  "url": "https://api.example.com/customers?phone={{caller_phone}}",
  "method": "GET",
  "headers": {
    "Content-Type": "application/json"
  },
  "authType": "bearer",
  "authCredentials": "{{api_token}}",
  "timeout": 5000,
  "retries": 1
}
```

## Use cases

<AccordionGroup>
  <Accordion title="CRM lookup">
    Look up the caller's account in your CRM by phone number. On success, use the response data to personalize the greeting.
  </Accordion>

  <Accordion title="Appointment scheduling">
    POST to a scheduling API with the caller's selected date/time (collected via Collect Digits or Speech Input).
  </Accordion>

  <Accordion title="Webhook notification">
    POST call data to a webhook endpoint for real-time event processing. Use `{{variable}}` interpolation in the request body.
  </Accordion>
</AccordionGroup>
