gitpod.v1.WebhookService

CreateWebhook

Creates a new webhook for receiving SCM events.

Use this method to:

  • Set up webhooks for repository or organization events
  • Configure webhook scope and provider

Examples

  • Create repository webhook:

    Creates a webhook scoped to a specific repository.

    name: "My Repo Webhook"
    type: WEBHOOK_TYPE_SCM_REPOSITORY
    scope: "gitpod-io/gitpod"
    provider: WEBHOOK_PROVIDER_GITHUB
    
  • Create organization webhook:

    Creates a webhook scoped to all repositories in an organization.

    name: "Org Webhook"
    type: WEBHOOK_TYPE_SCM_ORGANIZATION
    scope: "gitpod-io"
    provider: WEBHOOK_PROVIDER_GITHUB
    
post/gitpod.v1.WebhookService/CreateWebhook

Request body

descriptionstring

description is an optional description of the webhook's purpose

namestring

name is the display name of the webhook

provider'WEBHOOK_PROVIDER_UNSPECIFIED' | 'WEBHOOK_PROVIDER_GITHUB' | 'WEBHOOK_PROVIDER_GITLAB'

WebhookProvider identifies the Git provider.

scopestring

scope is the target of the webhook:

  • For REPOSITORY type: "owner/repo" (e.g., "gitpod-io/gitpod")
  • For ORGANIZATION type: "owner" (e.g., "gitpod-io")
type'WEBHOOK_TYPE_UNSPECIFIED' | 'WEBHOOK_TYPE_SCM_REPOSITORY' | 'WEBHOOK_TYPE_SCM_ORGANIZATION'

WebhookType determines the scope level of the webhook.

Response

Success

Changes