v50

latestOpenAPI 3.0.3MITraw.githubusercontent.com2023-11-288093493.9 MB
repos

Create a repository dispatch event

You can use this endpoint to trigger a webhook event called repository_dispatch when you want activity that happens outside of GitHub Enterprise Server to trigger a GitHub Actions workflow or GitHub App webhook. You must configure your GitHub Actions workflow or GitHub App to run when the repository_dispatch event occurs. For an example repository_dispatch webhook payload, see "RepositoryDispatchEvent."

The client_payload parameter is available for any extra information that your workflow might need. This parameter is a JSON payload that will be passed on when the webhook event is dispatched. For example, the client_payload can include a message that a user would like to send using a GitHub Actions workflow. Or the client_payload can be used as a test to debug your workflow.

This endpoint requires write access to the repository by providing either:

This input example shows how you can use the client_payload as a test to debug your workflow.

post/repos/{owner}/{repo}/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.

Request body

event_typestring required

A custom webhook event name. Must be 100 characters or fewer.

client_payloadobject

JSON payload with extra information about the webhook event that your action or workflow may use. The maximum number of top-level properties is 10.

Response

Response