GH-EVENT-SUBSCRIPTION-CREATE(1) GitHub CLI manual NAME gh-event-subscription-create - Create an event subscription (preview) SYNOPSIS gh event subscription create [flags] DESCRIPTION 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: o com.github.pull_request.review.submitted.v1: a review was submitted o com.github.pull_request.state.changed.v1: the pull request was merged, closed, reopened, marked ready for review, or converted to draft o com.github.pull_request.head.changed.v1: the head branch changed, for example after a push o com.github.pull_request.merge_conflict.v1: the pull request has a merge conflict o 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 Event type to subscribe to; repeat or separate with commas for more than one -q, --jq Filter JSON output using a jq expression --json Output JSON with the specified fields --resource URL of the resource to subscribe to -t, --template Format JSON output using a Go template; see "gh help formatting" JSON FIELDS createdAt, eventTypes, eventsUrl, expiresAt, id, resourceUrl, url EXIT CODES 0: Successful execution 1: Error 2: Command canceled 4: Authentication required NOTE: Specific commands may have additional exit codes. Refer to the command's help for more information. EXAMPLE # 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(1) Nov 2026 GH-EVENT-SUBSCRIPTION-CREATE(1)