Using fetch-url and api-call steps
Using fetch-url and api-call steps
Using fetch-url and api-call steps
Make HTTP requests to external APIs and services using fetch-url (for straightforward requests) or api-call (for full HTTP control with response mapping).
Use for HTTP requests to external URLs. Supports GET, POST, PUT, DELETE, and PATCH methods.
{{variable}} mentions like the URL field.Example:
The step returns the response body.
Switching the method back to GET or DELETE hides the body field without clearing its stored value, so you can toggle methods without losing your payload. See Request body for the canonical body format.
Use for full HTTP control: POST, PUT, DELETE, custom headers, authentication.
Add headers as key-value pairs:
For POST/PUT requests, provide the body as JSON:
Encode username:password in base64:
Do not hardcode API keys in Flows. Use Runtype’s secrets management to store credentials securely and reference them with {{secret:SECRET_NAME}} syntax.
Access response data in later steps using the step’s outputVariable name:
API calls can fail. Configure error handling on the step itself (continue on error, stop on error, or use fallbacks), or use a conditional step to check the result before proceeding.
Build URLs from variables:
Some APIs rate-limit requests. Add Wait Until steps between API calls if needed:
delayMs (e.g., 1000 for a 1-second pause)Use the step tester to verify requests without running the full Flow: