API Call
The Autohive API Call integration lets your agents and workflows make GET and POST requests to any API endpoint — no dedicated integration required. Use it to connect to internal APIs, third-party services, or any URL that accepts HTTP/HTTPS requests.
This integration uses the Autohive SDK’s context.fetch() method for making requests, supporting custom headers, query parameters, and request bodies. It’s ideal for connecting to APIs that don’t have a dedicated Autohive integration, webhook testing, and custom API workflow automation.
Use the integration
You can use the API Call integration with your agents, and workflows.
- Follow the Create your first agent guide to create an agent or use an existing agent in your workspace or from the marketplace.
- In Agent settings, scroll down to Add capabilities and enable the API Call capability.
- Prompt your agent with the request you’d like to make, including the URL and any required headers or parameters.
Available capabilities
GET Request
Make a GET request to any API endpoint.
| Parameter | Type | Required | Description |
|---|---|---|---|
url | string | Yes | The URL to make the GET request to |
params | object | No | Query parameters to append to the URL (key-value string pairs) |
headers | object | No | HTTP headers to include in the request (key-value string pairs) |
Response fields:
| Field | Type | Description |
|---|---|---|
status_code | integer | HTTP status code of the response |
response_data | any | The response body returned from the API |
headers | object | Response headers returned by the server |
success | boolean | Whether the request completed successfully |
error | string | Error message if the request failed |
POST Request
Make a POST request to any API endpoint.
| Parameter | Type | Required | Description |
|---|---|---|---|
url | string | Yes | The URL to make the POST request to |
headers | object | No | HTTP headers to include in the request (key-value string pairs) |
json_body | object | No | JSON request body — use this for JSON APIs. Automatically sets Content-Type: application/json |
body | any | No | Raw request body (object, string, or array) — used when json_body is not provided |
params | object | No | Query parameters to append to the URL (key-value string pairs) |
json_body and body are provided, json_body takes priority.Response fields:
| Field | Type | Description |
|---|---|---|
status_code | integer | HTTP status code of the response |
response_data | any | The response body returned from the API |
headers | object | Response headers returned by the server |
success | boolean | Whether the request completed successfully |
error | string | Error message if the request failed |
Key features
No authentication configuration required
This integration doesn’t require authentication setup within Autohive. Authentication to target APIs is handled via custom headers (e.g., Authorization bearer tokens, API keys) passed as inputs to each action, giving you complete control over how you authenticate with external services.
Flexible request body handling
The POST action supports both raw and JSON bodies. Use json_body for structured JSON payloads — Autohive automatically sets the correct Content-Type header. Use body for form data, plain text, or any other content type where you control the headers manually.
Query parameter support
Both GET and POST actions accept a params object that is serialized as URL query parameters. This keeps your base URL clean while making it easy to pass dynamic values like filters, pagination tokens, or API keys.
Common use cases
Fetch data from an internal or third-party API
Use a GET request to pull live data into your agent’s context — product inventory, user records, external dashboards, or any REST endpoint your organization exposes.
Submit data to an external service
Use a POST request to send structured data to a webhook, CRM, ticketing system, or any API that accepts JSON payloads.
Prototype integrations before building a dedicated connector
Use API Call to quickly test and validate a new service before investing in a full integration. Point your agent at any API endpoint and iterate on the request shape in real time.
Call internal APIs behind authentication
Pass Authorization headers directly in your request to access authenticated endpoints — Bearer tokens, API keys, or any other header-based credential scheme.
Known limitations
The SDK’s context.fetch() method currently returns only the parsed response body (dict, string, or None) rather than a full HTTP response object. As a result:
status_code— Not natively available from the SDK. Defaults to200on success and500on error. The actual HTTP status code is not returned.headers— Response headers are not currently provided by the SDK. This field will be an empty object ({}).
These fields are included in the output schema for forward compatibility. When the SDK is updated to expose status codes and response headers natively, this integration will surface them without requiring schema changes.
Source code and testing
The API Call integration is open source and maintained in the Autohive Integrations repository.
To run the integration tests locally (requires Python 3.13+):
- Navigate to the integration’s directory:
cd api-call - Install dependencies:
pip install -r requirements.txt -t dependencies - Run the tests:
python tests/test_api_call.py