> For the complete documentation index, see [llms.txt](https://developer.harness.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://developer.harness.io/harness-platform/knowledge-base-and-faqs/articles/api-to-run-a-pipeline-with-runtime-inputs.md).

# API to run a pipeline with runtime inputs

KB - How to run a pipeline with runtime inputs through API

### API to run a pipeline with runtime inputs <a href="#api-to-run-a-pipeline-with-runtime-inputs" id="api-to-run-a-pipeline-with-runtime-inputs"></a>

This knowledge base article walks you through how you can run a pipeline with runtime inputs through API.

### Steps <a href="#steps" id="steps"></a>

1. In the pipeline trigger, create the custom webhook. ![](https://173309742-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F3F2TpHXhur2QtQnORSM9%2Fuploads%2Fgit-blob-a9bdf1e1b673b6c5148260cb3a3084b51f5b6311%2Fwebhook.png?alt=media)
2. Copy the curl command from the webhook ![](https://173309742-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F3F2TpHXhur2QtQnORSM9%2Fuploads%2Fgit-blob-4cdd3c7fd38311709d93549698900f62ff8ac444%2Fcurl.png?alt=media)
3. Now in the curl command, you can pass the variable name and value in place of sample key and value at runtime while executing the pipeline.

Example cURL:

```
curl -X POST -H 'content-type: application/json' --url 'https://app.harness.io/gateway/pipeline/' -d '{"samplekey": "samplevalue"}'
```

{% @harness-feedback/feedback module="harness-ai" pagePath="harness-ai/knowledge-base-and-faqs/articles/api-to-run-a-pipeline-with-runtime-inputs" %}
