GitHub Workflow Dispatch IDs

Some time ago, we integrated our application with GitHub, to launch Actions as part of a bigger set of automations. When we developed this integration, the Workflow Dispatch API did not returned the newly created action, so a workaround was required.

The workaround

We followed the process that the user Bertrand Martel described in this StackOverflow post:

https://stackoverflow.com/questions/69479400/get-run-id-after-triggering-a-github-workflow-dispatch-event

Basically, it requires adding an ID parameter, and use in the workflow file definition as the run_name, so that then the application can query all actions and look for the action with the specified name.

I don’t really liked that solution, but it was the only way to get the workflow id. But finally, GitHub updated their API.

The update

GitHub team updated their API on 2026-03-10, so we can specify the API version. Adding the header X-GitHub-Api-Version: 2026-03-10 it will return the workflow run id, like this:


{
  "workflow_run_id": 1,
  "run_url": "https://api.github.com/repos/octo-org/octo-repo/actions/runs/1",
  "html_url": "https://github.com/octo-org/octo-repo/actions/runs/1"
}```

This can be checked in the official documentation for github:

[https://docs.github.com/en/rest/actions/workflows?apiVersion=2026-03-10#create-a-workflow-dispatch-event](https://docs.github.com/en/rest/actions/workflows?apiVersion=2026-03-10#create-a-workflow-dispatch-event)

The reason behind this article is try to substitute old search results with updated information.