How to trigger a flow run using curl?

Here is an example how you can call an API request with a GraphQL mutation to create flow run via curl:

curl '<https://api.prefect.io>' \\
  -X POST \\
  -H 'content-type: application/json' \\
	-H 'authorization: Bearer XXX' \\
  --data '{
    "query":"mutation {create_flow_run(input: { flow_id: \\"05f1872f-44b3-443a-bbd4-0a1198351cad\\" }) {id}}"
  }'

Make sure to replace the ID by your flow_id .