HTTP Requests Tool
Last updated: Jan 2026
Overview
The HTTP request integration allows your AI workflows to communicate with any REST API. Send data to external services, retrieve information, and integrate with third-party platforms like CRMs, databases, and more.
http_request Tool
AI models in your workflows can use the http_request tool to make HTTP calls. Simply describe what API call you need, and the AI will construct and execute the appropriate request.Making Requests
To make an HTTP request, instruct your AI model to call an API endpoint. The model will use the http_request tool with the appropriate parameters.
Call the JSONPlaceholder API to get a list of users.
Endpoint: https://jsonplaceholder.typicode.com/users
Then summarize the users' names and email addresses.Request Parameters
| Parameter | Description |
|---|---|
url | The full URL to call (required) |
method | HTTP method: GET, POST, PUT, PATCH, DELETE |
headers | Request headers (Authorization, Content-Type, etc.) |
body | Request body for POST/PUT/PATCH requests |
Example: POST Request
Create a new post using the JSONPlaceholder API:
- Endpoint: https://jsonplaceholder.typicode.com/posts
- Method: POST
- Body: { "title": "My Post", "body": "Content here", "userId": 1 }
Return the created post ID.HTTP Methods
All standard HTTP methods are supported. Choose the appropriate method based on the API operation you need to perform.
| Method | Purpose | Description |
|---|---|---|
GET | Retrieve Data | Fetch data from an API. Does not modify server state. |
POST | Create Data | Submit data to create new resources. Requires a request body. |
PUT | Replace Data | Replace an existing resource entirely. Requires full resource data. |
PATCH | Update Data | Partially update a resource. Only send fields that need changing. |
DELETE | Remove Data | Delete a resource from the server. |
Authentication
Many APIs require authentication. Include API keys, bearer tokens, or other credentials in your request headers.
API Key Header
Call the weather API with:
- URL: https://api.weather.com/v1/current?city=London
- Headers: { "X-API-Key": "your-api-key-here" }Bearer Token
Call the GitHub API with:
- URL: https://api.github.com/user/repos
- Headers: { "Authorization": "Bearer ghp_xxxx" }Basic Auth
Call the API with Basic authentication:
- URL: https://api.example.com/data
- Headers: { "Authorization": "Basic base64(username:password)" }Security Note
Avoid hardcoding sensitive API keys directly in prompts. User Secrets support is coming soon.Handling Responses
The http_request tool returns the API response including status code, headers, and body. JSON responses are automatically parsed for easy use.
Response Structure
{
"status": 200,
"statusText": "OK",
"headers": {
"content-type": "application/json",
"x-rate-limit-remaining": "99"
},
"body": {
"id": 1,
"name": "John Doe",
"email": "john@example.com"
}
}Response Handling Tips
- Check Status Codes: Verify 2xx status codes for successful requests.
- Handle Errors: Plan for 4xx/5xx responses in your workflow logic.
- Parse JSON: JSON bodies are automatically parsed into objects.
- Rate Limits: Check headers for rate limit information.
Common Status Codes
| Code | Meaning |
|---|---|
200 | OK - Request succeeded |
201 | Created - Resource created |
400 | Bad Request - Invalid data |
401 | Unauthorized - Auth required |
404 | Not Found - Resource missing |
500 | Server Error - API issue |
Best Practices
Follow these guidelines for reliable HTTP requests:
- Always specify the complete URL including protocol (https://)
- Include appropriate Content-Type headers for POST/PUT requests
- Handle API errors gracefully in your workflow
- Check rate limits before making multiple requests
- Use HTTPS endpoints for secure data transmission
- Validate API responses before using the data
- Consider timeout handling for slow APIs
Limitations
- Request timeout: 30 seconds maximum
- Response body limit: 10MB
- Some internal/localhost URLs may be blocked
- Binary responses are base64 encoded
Example: CRM Integration
1. Fetch customer data from CRM:
GET https://api.crm.com/customers/123
Headers: { "Authorization": "Bearer <token>" }
2. Update customer status:
PATCH https://api.crm.com/customers/123
Body: { "status": "active" }
3. Log the activity:
POST https://api.crm.com/activities
Body: { "customerId": 123, "action": "status_updated" }Key Takeaways
- Use http_request tool to call any REST API
- All HTTP methods supported: GET, POST, PUT, PATCH, DELETE
- Include authentication via headers (API keys, Bearer tokens)
- JSON responses are automatically parsed
- Handle errors and check status codes in your workflow logic