Executes HTTP requests to external APIs with comprehensive configuration options including authentication, headers, body formatting, and file handling.
The apiRequest function enables Vibes to interact with external systems and services through HTTP requests. This powerful function supports complex request configurations, multiple authentication methods, file uploads, and various data formats.
Execute HTTP requests to external APIs with comprehensive configuration options including authentication, headers, body formatting, and file handling.
Powerful Integration: This function provides the foundation for integrating Vibes with virtually any external system or service, enabling powerful workflow automation that spans multiple platforms and technologies.
| Parameter | Type | Required | Description |
|---|---|---|---|
| endpoint | string | The complete URL for the API request | |
| method | string | Optional | HTTP method: GET, POST, PUT, PATCH, DELETE (default: GET) |
| auth | object | Optional | Authentication configuration |
| headers | object/array | Optional | Custom headers for the request |
| body | object | Optional | Email content (supports HTML formatting) |
| maxResponseSize | number | Optional | Maximum response size in bytes (default: 50MB) |
The queryKnowledgebase function returns structured document entries with citation information and content excerpts.
The apiRequest function supports multiple authentication methods to work with different API requirements:
Standard bearer token authentication for OAuth and API tokens
HTTP Basic authentication using username and password
API key authentication with custom header configuration
OAuth2 token authentication for secure API access
Custom authentication headers for specialized requirements
Headers can be configured using either object or array format to meet different API requirements:
The function supports multiple body formats for different API requirements:
Standard JSON content for REST APIs
URL-encoded form data for traditional web forms
Multipart form data with file upload support
The apiRequest function provides sophisticated file handling capabilities for uploading documents, images, and other file types:
Basic data retrieval from an external API:
Creating new resources with JSON data:
Uploading files with API key authentication:
Advanced payment processing with multiple headers and authentication:
Using dynamic field types for flexible data submission:
The apiRequest function provides comprehensive error handling for various scenarios:
Protect API credentials and use appropriate authentication methods for your security requirements.
Implement proper error handling for background operations since users won't see failure messages.
Optimize API requests for better performance and resource usage.
Ensure reliable data processing and variable management.
These functions work well with apiRequest for building comprehensive API integration workflows: