API Request
API Request
Performs an HTTP request to an external URL, supporting the main methods (GET, POST, PUT, DELETE, OPTIONS) and allowing you to configure the headers and the body of the request.
Options
Request URL
Enter the full URL the request will be sent to. When an API client with a base URL is selected in the request settings, you can send just the path (e.g. /orders).
Select the request method
Select the HTTP method to be used: GET, POST, PUT, DELETE or OPTIONS.
Request body
Enter the body of the request. Copy exactly the content expected by the destination API.
Request header
Enter the headers necessary for the request, such as authentication tokens, content type, among others.
API client (optional)
Select a Create API client action of the flow so the request uses the client certificate (mTLS), base URL, default headers and authentication configured in it. That action must be in the same flow as this request, before it. Leave it empty for a regular request.
Returns
Javascript code
actions["action-id"].response // API response value (Any)
actions["action-id"].status // HTTP status code (Number)
actions["action-id"].statusText // HTTP status text (Text)
Field selection
- response — API response value (Any)
- status — numeric HTTP status code, e.g.
200,404,500(Number) - statusText — descriptive HTTP status text, e.g.
OK,Not Found(Text)
Rules and Conditions
- The Request URL field is required.
- The default method is GET if no other one is selected.
- The request body must be in the format expected by the destination API.
- With an API client selected, repeated headers follow this precedence: client default headers < authentication token < headers of this request.
- With authentication configured in the client, the token is obtained and renewed automatically; if the API responds
401, the request is retried once with a new token.