Run template
Runs a stored template by slug and returns the same shape as POST /v1/agent. An unknown name returns 400. This endpoint is in beta: parameter validation against each template’s declared input schema is not yet enforced, and a bad parameter currently surfaces as 500 rather than 400, so validate inputs client-side.
Authorizations
Every request carries a bearer API key, which looks like ph_live_.... Keep keys server-side, because a key grants full control of your sessions. A missing header returns 401; an invalid or revoked key currently returns 403, so treat the two together as authentication failure.
Body
The session to run the template in.
The template slug from GET /v1/templates. An unknown name returns 400.
Parameters for the template. Validation against the declared input schema is not yet enforced, so validate client-side.
Return a job_id immediately instead of waiting. Poll /v1/job/{job_id}.
Response
Successful Response
Whether the flow succeeded. In async_mode this is false while status is pending, which is not a failure.
The flow's output.
The steps the flow took.
The error, when the flow failed.
Set only when async_mode was requested.
pending while an async run is in flight.