Overview
The HTTP Request action enables your agents to interact with any API or webhook endpoint. Whether you’re fetching data, updating records, or triggering external workflows, HTTP Request provides complete control over your API interactions.HTTP Request is one of the most popular Lindy actions, giving you access to thousands of APIs that don’t have native Lindy integrations yet.
Adding HTTP Request to Your Workflow
![HTTP Request action in the Add Action menu under Popular and By Lindy categories [[memory:2619471]]](https://mintcdn.com/lindyai/6m-Rdk3yJVAHqZQC/lindy-brand-assets/lindy-http-request.png?fit=max&auto=format&n=6m-Rdk3yJVAHqZQC&q=85&s=ceabdf9e48db0fab857aa9ba86b449c5)
- Popular section (highlighted for quick access)
- By Lindy → All By Lindy section
Configuration Fields
URL (Required)
The complete endpoint URL for your API call. Examples:https://api.example.com/v1/usershttps://webhook.site/unique-id{{api_base_url}}/customers/{{customer_id}}
Use variables from previous steps by typing
{{ to see available options.Method
![HTTP method dropdown showing GET, POST, PUT, PATCH, DELETE options [[memory:2619471]]](https://mintcdn.com/lindyai/6m-Rdk3yJVAHqZQC/lindy-brand-assets/lindy-http-method.png?fit=max&auto=format&n=6m-Rdk3yJVAHqZQC&q=85&s=c31839b7ae42f73fbbd6bcb5261a6958)
| Method | Use Case |
|---|---|
| GET | Retrieve data without making changes |
| POST | Create new resources or submit data |
| PUT | Update entire resources |
| PATCH | Partially update resources |
| DELETE | Remove resources |
Headers
![Headers configuration showing key-value pairs with Content-Type example [[memory:2619471]]](https://mintcdn.com/lindyai/XRHjWZiSf5VPQvY1/lindy-brand-assets/lindy-http-headers.png?fit=max&auto=format&n=XRHjWZiSf5VPQvY1&q=85&s=047962be0fc2bef72a77ba722ea05fef)
If you specify a Content-Type header, it will override the content type field selection.
Content Type
Tells the server what format your request body is in:- application/json — Most common for modern APIs (default)
- application/xml — For XML-based APIs
- application/x-www-form-urlencoded — For form submissions
- multipart/form-data — For file uploads
- text/plain — For plain text data
Body
The request body contains the data you’re sending to the API. Lindy offers two powerful modes:- Auto Mode
- Prompt AI Mode
![Body field in Auto mode with AI assistance [[memory:2619471]]](https://mintcdn.com/lindyai/XRHjWZiSf5VPQvY1/lindy-brand-assets/lindy-http-body.png?fit=max&auto=format&n=XRHjWZiSf5VPQvY1&q=85&s=8cf501fe3348a15cd9bd735a90adcde3)
- The URL and method you’ve chosen
- Available variables from previous steps
- Common patterns for the API endpoint
Common Patterns
Authentication
Authentication
Bearer Token:API Key:Basic Auth:
Working with JSON APIs
Working with JSON APIs
Sending JSON data:Updating records:
Error Handling
Error Handling
Add conditions after your HTTP Request to handle different responses:
- Check status code:
{{http_request.status_code}} - Parse error messages:
{{http_request.response.error}} - Implement retry logic for failures
- Log errors for debugging
Response Handling
After execution, access the response data:- Response body:
{{http_request.response}} - Status code:
{{http_request.status_code}} - Headers:
{{http_request.headers}}
- Parse JSON responses
- Check for success/failure
- Extract specific data fields
- Trigger different workflows based on results
Best Practices
Use Variables
Use Variables
Reference data from previous steps using
{{variable_name}} syntax to create dynamic, data-driven API callsTest First
Test First
Use postman or similar tools to test your requests before going live to avoid issues in production
Handle Errors
Handle Errors
Always add error handling conditions after API calls to gracefully manage failures and unexpected responses