You can only run it in n8n. You can use a webhook trigger and make the request to that URL whenever you want n8n to trigger your workflow or bundle this as a part of your application or executable.
You’d have to make sure you either run n8n Cloud or use a service like Render.com where n8n would be available over the internet to receive your webhook connections.