Skip to content

workflow_dispatch returns 200 with a body instead of 204 ​

Provider
GitHub
Endpoint
POST /repos/{owner}/{repo}/actions/workflows/{workflow_id}/dispatches
Effective
2025-12-19
Severity
critical
Change
status-code
Status
verified
Automatic fix
status-code-accept-set

What changed ​

POST .../actions/workflows/{workflow_id}/dispatches started answering 200 OK with a JSON body (workflow run id) instead of 204 No Content. The OpenAPI schema and docs still said 204, and there was no changelog, version, or preview header. Clients that require exactly 204 treat a successful dispatch as a failure. GitHub later (2026-02-19) documented 200 as the response when return_run_details is set, and GitHub CLI v2.87.0+ sets it by default.

What to do ​

Treat both 200 and 204 as success (any 2xx). If you want the run id, send return_run_details: true and read it from the 200 body.

Sources ​

Check your code ​

bash
npx shapi-cli scan .

shapi scan lists the call sites this change affects; shapi fix repairs them test-first when the advisory has an automatic fix. All advisories · Markdown · OSV · JSON