← Back
GitHub
GitHub Actions workflow dispatch API now returns run IDs via optional parameter
GitHub Actions · apifeaturerelease · github.blog ↗

Workflow Dispatch API Enhancement

The GitHub Actions workflow dispatch API endpoint now provides better observability when triggering workflows programmatically. Previously, the endpoint returned only a 204 No Content status code, making it difficult to map API requests to the actual workflow runs they created.

What's New

New optional parameter: The return_run_details boolean parameter allows developers to request metadata in the API response.

Enhanced response: When enabled, the API returns a 200 OK response containing:

  • Workflow ID
  • API URL for the workflow run
  • Workflow run URL

Backward compatible: If the parameter is omitted, the endpoint maintains the previous behavior of returning 204 No Content.

GitHub CLI Support

This capability is also integrated into GitHub CLI as of v2.87.0. The gh workflow run command now returns the URL for the created run and provides the corresponding gh run view command for easy inspection.

Developer Benefits

With this update, developers can:

  • Immediately identify which workflow runs originated from their API calls
  • Eliminate the need for extensive polling or custom tracking solutions
  • Reduce complexity in CI/CD automation workflows that depend on run identification

The GitHub CLI version 2.87.0 and later defaults return_run_details to true, providing better defaults for CLI users.

Learn more in the GitHub Actions documentation.