Text of cli.github.com › manual › gh_event_subscription_create as Styx crawled it on Nov 18, 2026. The page may have changed since. Only its words are kept, without pictures or layout.

Open the live page

GitHub CLI | Take GitHub to the command line

CLI manual gh event subscription create gh event subscription create [flags] Create a subscription to events of the given types on a resource, without listening to it. Pass the resource URL with --resource and the event types with --event , repeating the flag or separating types with commas: com.github.pull_request.review.submitted.v1 : a review was submitted com.github.pull_request.state.changed.v1 : the pull request was merged, closed, reopened, marked ready for review, or converted to draft com.github.pull_request.head.changed.v1 : the head branch changed, for example after a push com.github.pull_request.merge_conflict.v1 : the pull request has a merge conflict com.github.pull_request.check_suite.status.changed.v1 : a check suite on the head commit completed, such as a CI workflow Creating a subscription is idempotent: if an active subscription for the same resource and event types exists, it is returned instead.

Once successful, the command prints the subscription ID to stdout. Use gh event listen --subscription to receive its events. To create a subscription and listen to it in one step, use gh event listen --resource instead. Options --event <type> Event type to subscribe to; repeat or separate with commas for more than one -q , --jq <expression> Filter JSON output using a jq expression --json <fields> Output JSON with the specified fields --resource <string> URL of the resource to subscribe to -t , --template <string> Format JSON output using a Go template; see "gh help formatting" JSON Fields createdAt , eventTypes , eventsUrl , expiresAt , id , resourceUrl , url Examples # Subscribe to reviews and state changes of a pull request $ gh event subscription create --resource https://github.com/OWNER/REPO/pull/123 --event com.github.pull_request.review.submitted.v1,com.github.pull_request.state.changed.v1 See also gh event subscription