What is an action?
An action is a single HTTP request task: SafeFetch stores the request intent, makes the HTTP request to any URL (API endpoint, internal service, etc.), retries if needed, and stores the final result.Lifecycle
| Status | Description |
|---|---|
pending | Queued, waiting for dispatch |
active | HTTP request in flight |
awaiting_approval | Held for human approval |
completed | Target API responded successfully |
failed | Max retries exhausted |
cancelled | Cancelled by user |
Action fields
Unique action ID (for example
act_...).Lifecycle status:
pending, active, awaiting_approval, completed, failed, cancelled.Target URL for the HTTP request.
HTTP method (
GET|POST|PUT|PATCH|DELETE).JSON body sent to the target URL.
Optional per-action outbound headers.
Deduplication key for semantic duplicates (24-hour window).
Idempotency key from request header (24-hour window).
Number of delivery attempts already used.
Maximum delivery attempts before
failed.Optional URL notified on completion/failure.
Allowed operations for current status (
approve, cancel, retry).Structured error detail, present only when
status is failed. Contains:source—"target"if the endpoint returned a non-2xx response;"dispatch"for network errors, DNS failures, or timeouts.message— human-readable description (same aslast_error).response_code— HTTP status code from the target (nullfor dispatch errors).response_body— response body from the target (nullfor dispatch errors).
Synchronous mode
Passsync: true when creating an action to block the request until the action reaches a terminal status (completed, failed, or cancelled). The response is the final action object with response_code, response_body, and duration_ms populated.
status: pending or status: active.
Incompatible with approve: true. Synchronous mode cannot wait for a human to approve. Combining both returns 400 invalid_sync.
Available operations
- pending
- awaiting_approval
- failed/cancelled
actions: ["cancel"]Receipt page
Every action gets a shareablereceipt_url (e.g. /r/rcpt_...) returned in the API response on creation and retrieval. The receipt page shows the full action lifecycle — status, URL, timing, attempts, request body, and response — with sensitive headers masked. No authentication is required to view a receipt; access is secured by the unguessable receipt token.
Computed fields
Shareable URL for this action’s receipt page. Secured by an unguessable token — no authentication required to view.
Returned for retried pending/active actions. Computed as
retries - attempts.Seconds until
next_retry_at when a retry is scheduled.