Resolve a run that is parked on a human approval/input step
Automations
Resolve a run that is parked on a human approval/input step
POST /ai/automations/runs//respond
POST
Resolve a run that is parked on a human approval/input step
This endpoint requires authentication. Include your Bearer token in the Authorization header.
Description
POST /ai/automations/runs//respond Writes the approval record (approved_by_user_id, approved_at,
approval_decision) and resumes the workflow in one transaction —
the decision is never recorded without the resume happening, or vice
versa. What reject does is per-template: a decline branch where
one exists, cancelled otherwise (the button copy is
reject_label on the run’s awaiting block).
Authorization: a literal owner or admin role only —
deliberately NOT the repo’s usual role-hierarchy gate, which would
also admit super_admin/main_super_admin. WP-08 extends the
underlying service with the full approval contract: self-approval
prohibition (an agent may not resolve a run it started), resume-
payload validation against the step’s resumeSchema, and a
distinct awaitingAgeSeconds field on the response showing how
long the run has been parked (no TTL/escalation in Phase 1 — see
plan §Run metering).
Authorization:
- Required role:
adminorowner(exact match, not hierarchy)
Code Examples
Authorizations
JWT Authorization header using the Bearer scheme. Format: "Bearer {token}"
Path Parameters
Body
application/json