Create a new webhook subscription by specifying both an address
and a topic
.
Amazon EventBridge and Google Pub/Sub webhook subscriptions use this field differently.For more information, refer to the Amazon EventBridge and Google Cloud Pub/Sub pages.
curl --location --request POST 'https://demo.myshopify.com//admin/api//webhooks.json'
{
"webhook": {
"id": 8135413075,
"address": "pubsub://projectName:topicName",
"topic": "customers/update",
"created_at": "2023-01-16T14:14:54-05:00",
"updated_at": "2023-01-16T14:14:54-05:00",
"format": "json",
"fields": [],
"metafield_namespaces": [],
"api_version": "unstable",
"private_metafield_namespaces": []
}
}