Automations

Trigger automation

Start a run now. With an idempotency_key (body or Idempotency-Key header) the same key returns the run already started for it (200) rather than a second run (201). input is exposed to steps as {{trigger.*}}.

post/v1/automations/{automationId}/trigger

Request

  • Base URL: https://api.1claw.co
  • URL: https://api.1claw.co/v1/automations/{automationId}/trigger
  • Auth: HTTP bearer

Path parameters

automationIdstring uuid required

Request body

inputobject

Exposed to steps as {{trigger.*}}.

idempotency_keystring

Same key twice for one automation returns the existing run (200) instead of starting a second (201). Idempotency-Key header is equivalent.

Response

An earlier run with the same idempotency key

idstring uuid required
automation_idstring uuid required
agent_idstring uuid required
status'running' | 'success' | 'completed_with_skips' | 'failed' | 'timed_out' | 'cancelled' | 'awaiting_approval' | 'waiting' | 'awaiting_callback' required

awaiting_approval, waiting (a wait_until park) and awaiting_callback are parked states: the run's clock is stopped and it continues when the approval is decided, the wake time passes, or the callback URL is posted to.

paused_reason'approval' | 'wait_until' | 'callback' nullable
paused_at_stepinteger nullable
paused_approval_idstring uuid nullable
paused_untilstring date-time nullable
paused_expires_atstring date-time nullable
spec_versioninteger nullable
idempotency_keystring nullable
parent_run_idstring uuid nullable

Set when a call_automation step started this run.

step_resultsunknown
errorstring nullable
trigger_sourcestring nullable
contextobject nullable

JSONB context passed between workflow steps

started_atstring date-time required
finished_atstring date-time nullable
tokens_usedinteger required
cost_centsinteger required

Changes

No recorded changes to this operation across all 1 revision of this API.