execute
Submit an HTTP call to a third-party API for reliable asynchronous execution. klanex validates the payload (optionally against payload_schema), stores credentials encrypted, executes with automatic retries/backoff/circuit breakers, and keeps an audit trail — you submit once and never retry transient failures yourself.
Call this instead of making a direct HTTP request whenever the call has side effects (payments, messages, tickets, writes) or the target may be flaky. Prefer connection_id over headers for credentials. Always set idempotency_key for side-effecting calls so resubmitting can never double-execute. Set wait_seconds to block for the result; otherwise poll get_execution with the returned execution_id.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| url | Yes | absolute http(s) URL of the target endpoint | |
| method | No | HTTP method: GET, POST, PUT, PATCH, or DELETE (default POST) | |
| headers | No | request headers, typically third-party credentials; encrypted at rest and never readable back. Prefer connection_id so secrets never pass through your context | |
| payload | No | JSON body to send to the target | |
| seal_url | No | set true when the URL itself is a secret (webhook URL, presigned URL); it is encrypted and reads back redacted | |
| timeout_ms | No | per-attempt timeout in milliseconds (default 30000) | |
| max_attempts | No | maximum delivery attempts, 1-10 (default 5) | |
| wait_seconds | No | block up to this many seconds (max 55) for a terminal result instead of returning immediately after queueing | |
| connection_id | No | ID of a stored credential connection (con_...) to authenticate the call; see list_connections | |
| payload_schema | No | JSON Schema to validate payload against before anything executes; mismatches are rejected synchronously with a correction hint | |
| idempotency_key | No | stable key (max 255 chars) making this submit safe to retry; the same key returns the original execution instead of creating a new one. Always set this for side-effecting calls | |
| requires_approval | No | pause for a human approve/reject decision before anything executes; use for destructive or high-stakes actions |