Skip to main content
Anchor to pubSubWebhookSubscriptionCreate

pubSubWebhookSubscriptionCreate

mutation
Deprecated. Use webhookSubscriptionCreate instead.

Creates a webhook subscription that notifies your App when specific events occur in a shop. Webhooks push event data to your endpoint immediately when changes happen, eliminating the need for polling.

This mutation configures webhook delivery to a Google Cloud Pub/Sub topic. You can filter events using Shopify API search syntax to receive only relevant webhooks, control which data fields are included in webhook payloads, and specify metafield namespaces to include.


Note

The Webhooks API version configured in your app determines the API version for webhook events. You can't specify it per subscription.


Building an app? If you only use app-specific webhooks, you won't need this. App-specific webhook subscriptions specified in your shopify.app.toml may be easier. They are automatically kept up to date by Shopify & require less maintenance. Please read About managing webhook subscriptions.

•WebhookSubscriptionTopic!
required

The type of event that triggers the webhook.

•PubSubWebhookSubscriptionInput!
required

Specifies the input fields for a Google Cloud Pub/Sub webhook subscription.


Was this section helpful?

Anchor to PubSubWebhookSubscriptionCreatePayload returnsPubSubWebhookSubscriptionCreatePayload returns

•[PubSubWebhookSubscriptionCreateUserError!]!
non-null

The list of errors that occurred from executing the mutation.

•WebhookSubscription

The webhook subscription that was created.


Was this section helpful?