http
Makes HTTP requests to external APIs and returns the response.URL
The full URL to send the request to. Supports template variables.| YAML Key | url |
| Type | string |
| Required | Yes |
https://api.example.com/usershttps://api.example.com/users/{{ param "user_id" }}
HTTP Method
The HTTP method to use for the request.| YAML Key | method |
| Type | string |
| Required | Yes |
GET, POST, PUT, PATCH, DELETE, HEAD, OPTIONS
Headers
HTTP headers to include with the request as key-value pairs.| YAML Key | headers |
| Type | map |
| Required | No |
Authorization, Content-Type, and Accept.
Body
The request body data. Typically used withPOST, PUT, and PATCH requests.
| YAML Key | body |
| Type | object |
| Required | No |
Content-Type is application/json.
Response Path
A JSONPath expression to extract a specific field from the response. When set, only the extracted value is returned instead of the full response.| YAML Key | responsePath |
| Type | string |
| Required | No |
access_token extracts just the token from an OAuth response.
Expected Response Code
The expected HTTP status code. If the actual response code differs, the action fails and routes to thefail step.
| YAML Key | expectedResponseCode |
| Type | string |
| Required | No |
"201" for expecting a created response.
Fail If Response Empty
Whether to treat an empty response body as a failure.| YAML Key | failIfResponseEmpty |
| Type | boolean |
| Required | No |
| Default | true |
Examples
GET Request
Fetch data from an external API:POST Request
Create a resource on an external service:Extract Field from Response
Get just the access token from an OAuth token endpoint:Webhook Call
Trigger an external webhook with workflow data:Chaining API Calls
Use the result of one HTTP call in another:Next Steps
Secrets Management
Securely store API keys and tokens for your HTTP requests.
Authentication
Secure your own APIs with JWT and authentication actions.
Data Operations
Store and retrieve data from databases.
Actions Overview
Learn the fundamentals of actions in ServFlow.