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.

Example Prompt
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

ParameterDescription
urlThe full URL to call (required)
methodHTTP method: GET, POST, PUT, PATCH, DELETE
headersRequest headers (Authorization, Content-Type, etc.)
bodyRequest body for POST/PUT/PATCH requests

Example: POST Request

text
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.

MethodPurposeDescription
GETRetrieve DataFetch data from an API. Does not modify server state.
POSTCreate DataSubmit data to create new resources. Requires a request body.
PUTReplace DataReplace an existing resource entirely. Requires full resource data.
PATCHUpdate DataPartially update a resource. Only send fields that need changing.
DELETERemove DataDelete 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

text
Call the weather API with:
- URL: https://api.weather.com/v1/current?city=London
- Headers: { "X-API-Key": "your-api-key-here" }

Bearer Token

text
Call the GitHub API with:
- URL: https://api.github.com/user/repos
- Headers: { "Authorization": "Bearer ghp_xxxx" }

Basic Auth

text
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

json
{
  "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

CodeMeaning
200OK - Request succeeded
201Created - Resource created
400Bad Request - Invalid data
401Unauthorized - Auth required
404Not Found - Resource missing
500Server 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

text
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