v68

latestOpenAPI 3.0.3MITraw.githubusercontent.com2026-08-011,21696712.3 MB
actions

Create a workflow dispatch event

You can use this endpoint to manually trigger a GitHub Actions workflow run. You can replace workflow_id with the workflow file name. For example, you could use main.yaml.

You must configure your GitHub Actions workflow to run when the workflow_dispatch webhook event occurs. The inputs are configured in the workflow file. For more information about how to configure the workflow_dispatch event in the workflow file, see "Events that trigger workflows."

OAuth tokens and personal access tokens (classic) need the repo scope to use this endpoint.

post/repos/{owner}/{repo}/actions/workflows/{workflow_id}/dispatches

Path parameters

ownerstring required

The account owner of the repository. The name is not case sensitive.

repostring required

The name of the repository without the .git extension. The name is not case sensitive.

integer required
OR
string required

The ID of the workflow. You can also pass the workflow file name as a string.

Request body

refstring required

The git reference for the workflow. The reference can be a branch or tag name.

inputsobject

Input keys and values configured in the workflow file. The maximum number of properties is 25. Any default properties configured in the workflow file will be used when inputs are omitted.

return_run_detailsboolean

Whether the response should include the workflow run ID and URLs.

Response

Response including the workflow run ID and URLs when return_run_details parameter is true.

workflow_run_idinteger required

The ID of the workflow run.

run_urlstring uri required

The URL to the workflow run.

html_urlstring uri required