Arno Burnuk
08/20/2025, 5:52 PMMarvin
08/20/2025, 5:52 PMArno Burnuk
08/20/2025, 5:53 PMMarvin
08/20/2025, 5:56 PMmsg
as a flow parameter.
Assuming Prefect 3.x, here’s the curl you’re after:
# required values
ACCOUNT_ID="your-account-id"
WORKSPACE_ID="your-workspace-id"
DEPLOYMENT_ID="your-deployment-id"
PREFECT_API_KEY="pnu_..." # user or service account key
curl -X POST \
"<https://api.prefect.cloud/api/accounts/${ACCOUNT_ID}/workspaces/${WORKSPACE_ID}/flow_runs>" \
-H "Authorization: Bearer ${PREFECT_API_KEY}" \
-H "Content-Type: application/json" \
-d '{
"deployment_id": "'"${DEPLOYMENT_ID}"'",
"parameters": {
"msg": "Hello, agent."
},
"name": "agent-run-from-curl"
}'
- This creates a flow run for your deployment and passes {"msg": "Hello, agent."}
to the flow.
- Your flow needs to accept a msg
parameter and hand it to your ControlFlow agent logic.
API reference: Create a flow run (Prefect 3 Cloud API)
If you actually meant “hit an HTTP endpoint exposed by my agent,” Prefect Cloud does not host arbitrary HTTP endpoints for your code. Options:
- Use the REST call above (recommended), or
- Create a Cloud Automation with a Webhook trigger that forwards the payload into your flow parameters, then curl the webhook URL.
If you want, share how you deployed the agent (flow signature, deployment name) and I’ll tailor the exact payload and endpoint details. I live to serve. Begrudgingly.Arno Burnuk
08/20/2025, 5:59 PMArno Burnuk
08/20/2025, 6:09 PMArno Burnuk
08/20/2025, 6:09 PMMarvin
08/20/2025, 6:09 PMMarvin
08/20/2025, 6:11 PMmsg
parameter, or
B) hit a stable webhook URL you can curl directly?
Option A — call the Prefect Cloud API to start your deployment with a `msg`:
ACCOUNT_ID="your-account-id"
WORKSPACE_ID="your-workspace-id"
DEPLOYMENT_ID="your-deployment-id"
PREFECT_API_KEY="pnu_..."
curl -X POST \
"<https://api.prefect.cloud/api/accounts/${ACCOUNT_ID}/workspaces/${WORKSPACE_ID}/flow_runs>" \
-H "Authorization: Bearer ${PREFECT_API_KEY}" \
-H "Content-Type: application/json" \
-d '{
"deployment_id": "'"${DEPLOYMENT_ID}"'",
"parameters": { "msg": "Hello, agent." },
"name": "agent-run-from-curl"
}'
- Your flow must accept a msg: str
parameter and feed it into your ControlFlow logic.
- API reference: Create a flow run
Option B — use a Prefect Cloud Webhook (gives you a URL to curl):
1) In Cloud: Automations → New → Trigger: Webhook → Action: Run Deployment.
2) In the action’s parameters, map your flow param, e.g. msg = {{ event.body.msg }}
.
3) Curl it:
curl -X POST "<YOUR_WEBHOOK_URL>" \
-H "Content-Type: application/json" \
-d '{"msg":"Hello, agent."}'
- Webhook guide: Create a webhook
Tell me which route you prefer (and your deployment/flow param name), and I’ll tailor the exact payload. I can hardly contain my enthusiasm.Arno Burnuk
08/20/2025, 8:14 PMArno Burnuk
08/20/2025, 8:15 PMArno Burnuk
08/20/2025, 8:18 PM