Webhook Subscription
A webhook subscription is a persisted data object created by an app using the REST Admin API or GraphQL Admin API. It describes the topic that the app wants to receive, and a destination where Shopify should send webhooks of the specified topic. When an event for a given topic occurs, the webhook subscription sends a relevant payload to the destination. Learn more about the webhooks system.
Anchor to FieldsFields
- Anchor to apiVersionapi•Api
Version Version! non-null The Admin API version that Shopify uses to serialize webhook events. This value is inherited from the app that created the webhook subscription.
- Anchor to createdAtcreated•Date
At Time! non-null The date and time when the webhook subscription was created.
- Anchor to filterfilter•String
A constraint specified using search syntax that ensures only webhooks that match the specified filter are emitted. See our guide on filters for more details.
- Anchor to formatformat•Webhook
Subscription Format! non-null The format in which the webhook subscription should send the data.
- •ID!non-null
A globally-unique ID.
- Anchor to includeFieldsinclude•[String!]!
Fields non-null The list of fields to be included in the webhook subscription. Only the fields specified will be included in the webhook payload. If null, then all fields will be included. Learn more about modifying webhook payloads.
- Anchor to legacyResourceIdlegacy•Unsigned
Resource Id Int64! non-null The ID of the corresponding resource in the REST Admin API.
- Anchor to metafieldNamespacesmetafield•[String!]!
Namespaces non-null The list of namespaces for any metafields that should be included in the webhook subscription.
- Anchor to metafieldsmetafields•[Webhook
Subscription Metafield Identifier!]! non-null The list of identifiers specifying metafields to include in the webhook subscription.
- Anchor to topictopic•Webhook
Subscription Topic! non-null The type of event that triggers the webhook. The topic determines when the webhook subscription sends a webhook, as well as what class of data object that webhook contains.
- Anchor to updatedAtupdated•Date
At Time! non-null The date and time when the webhook subscription was updated.
- •String!non-null
The URI to which the webhook subscription will send events.
Deprecated fields
- Anchor to callbackUrlcallback•URL!
Url non-nullDeprecated - Anchor to endpointendpoint•Webhook
Subscription Endpoint! non-nullDeprecated
Anchor to QueriesQueries
- •query
Returns a webhook subscription by ID.
Building an app? If you only use app-specific webhooks, you won't need this. App-specific webhook subscriptions specified in your
shopify.app.tomlmay be easier. They are automatically kept up to date by Shopify & require less maintenance. Please read About managing webhook subscriptions.- •ID!required
The ID of the
to return.
Arguments
- •ID!
- •query
Retrieves a paginated list of webhook subscriptions created using the API for the current app and shop.
NoteReturns only shop-scoped subscriptions, not app-scoped subscriptions configured in TOML files.
Subscription details include event topics, endpoint URIs, filtering rules, field inclusion settings, and metafield namespace permissions. Results support cursor-based pagination that you can filter by topic, format, or custom search criteria.
Building an app? If you only use app-specific webhooks, you won't need this. App-specific webhook subscriptions specified in your
shopify.app.tomlmay be easier. They are automatically kept up to date by Shopify & require less maintenance. Please read About managing webhook subscriptions.- Anchor to firstfirst•Int
The first
nelements from the paginated list.- Anchor to afterafter•String
The elements that come after the specified cursor.
- Anchor to lastlast•Int
The last
nelements from the paginated list.- Anchor to beforebefore•String
The elements that come before the specified cursor.
- Anchor to reversereverse•BooleanDefault:false
Reverse the order of the underlying list.
- Anchor to sortKeysort•Webhook
Key Subscription Sort Keys Default:CREATED_AT Sort the underlying list using a key. If your query is slow or returns an error, then try specifying a sort key that matches the field used in the search.
- Anchor to queryquery•String
A filter made up of terms, connectives, modifiers, and comparators. You can apply one or more filters to a query. Learn more about Shopify API search syntax.
- Anchor to callbackUrlcallback•URL
Url Deprecated - •String
URI to filter by. Supports an HTTPS URL, a Google Pub/Sub URI (pubsub://{project-id}:{topic-id}) or an Amazon EventBridge event source ARN.
- Anchor to formatformat•Webhook
Subscription Format Response format to filter by.
- Anchor to topicstopics•[Webhook
Subscription Topic!] List of webhook subscription topics to filter by.
Arguments
Anchor to MutationsMutations
- •mutation
Creates a webhook subscription that notifies your
Appwhen specific events occur in a shop. Webhooks push event data to your endpoint immediately when changes happen, eliminating the need for polling.The subscription configuration supports multiple endpoint types including HTTPS URLs, Google Pub/Sub topics, and AWS EventBridge event sources. 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.
NoteThe 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.tomlmay be easier. They are automatically kept up to date by Shopify & require less maintenance. Please read About managing webhook subscriptions.- Anchor to topictopic•Webhook
Subscription Topic! required The type of event that triggers the webhook.
- Anchor to webhookSubscriptionwebhook•Webhook
Subscription Subscription Input! required Specifies the input fields for a webhook subscription.
Arguments
- •mutation
Updates a webhook subscription's configuration. Modify the endpoint URL, event filters, included fields, or metafield namespaces without recreating the subscription.
The mutation accepts a
that specifies the new configuration. You can switch between endpoint types (HTTP, Pub/Sub, EventBridge) by providing a different URI format. Updates apply atomically without interrupting webhook delivery.Building an app? If you only use app-specific webhooks, you won't need this. App-specific webhook subscriptions specified in your
shopify.app.tomlmay be easier. They are automatically kept up to date by Shopify & require less maintenance. Please read About managing webhook subscriptions.- •ID!required
The ID of the webhook subscription to update.
- Anchor to webhookSubscriptionwebhook•Webhook
Subscription Subscription Input! required Specifies the input fields for a webhook subscription.
Arguments
- •ID!
Deprecated mutations
- •mutationDeprecated
- Anchor to topictopic•Webhook
Subscription Topic! required The type of event that triggers the webhook.
- Anchor to webhookSubscriptionwebhook•Event
Subscription Bridge Webhook Subscription Input! required Specifies the input fields for an EventBridge webhook subscription.
Arguments
- •mutationDeprecated
- •ID!required
The ID of the webhook subscription to update.
- Anchor to webhookSubscriptionwebhook•Event
Subscription Bridge Webhook Subscription Input! required Specifies the input fields for an EventBridge webhook subscription.
Arguments
- •ID!
- •mutationDeprecated
- Anchor to topictopic•Webhook
Subscription Topic! required The type of event that triggers the webhook.
- Anchor to webhookSubscriptionwebhook•Pub
Subscription Sub Webhook Subscription Input! required Specifies the input fields for a Google Cloud Pub/Sub webhook subscription.
Arguments
- •mutationDeprecated
- •ID!required
The ID of the webhook subscription to update.
- Anchor to webhookSubscriptionwebhook•Pub
Subscription Sub Webhook Subscription Input! required Specifies the input fields for a Google Cloud Pub/Sub webhook subscription.
Arguments
- •ID!