v18

latestOpenAPI 3.0.0raw.githubusercontent.com2026-08-014211,6201.8 MB
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 scopes and provider

Examples

  • Create repository webhook with multiple scopes:

    Creates a webhook scoped to specific repositories.

    name: "My Repo Webhook"
    type: WEBHOOK_TYPE_SCM_REPOSITORY
    scopes:
      - host: "github.com"
        owner: "gitpod-io"
        name: "gitpod"
      - host: "github.com"
        owner: "gitpod-io"
        name: "gitpod-next"
    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
    organizationScope:
      host: "github.com"
      name: "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' | 'WEBHOOK_PROVIDER_BITBUCKET'

WebhookProvider identifies the Git provider.

scopestring

Deprecated: Use scopes instead. 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")
  • Empty string is allowed for webhooks that don't require scope filtering
type'WEBHOOK_TYPE_UNSPECIFIED' | 'WEBHOOK_TYPE_SCM_REPOSITORY' | 'WEBHOOK_TYPE_SCM_ORGANIZATION'

WebhookType determines the scope level of the webhook.

Response

Success