Webhook Creation Returns 200 OK but No Webhooks Created

I’m sending a POST request to create a webhook for the orders/create event. Although I’m getting a 200 OK response, the response body shows an empty webhooks array:

@body = {"webhooks": []}

What’s strange is that I have another store where I use the exact same process, and it works perfectly, webhooks are created as expected. But for this specific store, the response consistently returns an empty list.

Here’s the full response for reference:

#<ShopifyAPI::Clients::HttpResponse:0x00007fc7c7cadca8
@api_call_limit={:request_count=>1, :bucket_size=>80},
@body={"webhooks"=>[]},
@code=200,
@headers={
  "date"=>["Thu, 27 Mar 2025 16:54:02 GMT"],
  "content-type"=>["application/json; charset=utf-8"],
  "transfer-encoding"=>["chunked"],
  "connection"=>["close"],
  "x-sorting-hat-podid"=>["322"],
  "x-sorting-hat-shopid"=>["88263065923"],
  "vary"=>["Accept-Encoding"],
  "referrer-policy"=>["origin-when-cross-origin"],
  "x-frame-options"=>["DENY"],
  "x-shopid"=>["88263065923"],
  "x-shardid"=>["322"],
  "x-stats-userid"=>[""],
  "x-stats-apiclientid"=>["235261394945"],
  "x-stats-apipermissionid"=>["846637564227"],
  "x-shopify-api-version"=>["2025-01"],
  "http_x_shopify_shop_api_call_limit"=>["1/80"],
  "x-shopify-shop-api-call-limit"=>["1/80"],
  "strict-transport-security"=>["max-age=7889238"],
  "x-request-id"=>["3a523480-4857-42c1-afeb-850d91fc0e20-1743094442"],
  "server-timing"=>["processing;dur=133", "cfRequestDuration;dur=167.000055"],
  "content-security-policy"=>[
    "default-src 'self' data: blob: 'unsafe-inline' 'unsafe-eval' https://* shopify-pos://*; block-all-mixed-content; child-src 'self' https://* shopify-pos://*; connect-src 'self' wss://* https://*; frame-ancestors 'none'; img-src 'self' data: blob: https:; script-src https://cdn.shopify.com https://cdn.shopifycdn.net https://checkout.pci.shopifyinc.com https://checkout.pci.shopifyinc.com/build/75a428d/card_fields.js https://api.stripe.com https://mpsnare.iesnare.com https://appcenter.intuit.com https://www.paypal.com https://js.braintreegateway.com https://c.paypal.com https://maps.googleapis.com https://www.google-analytics.com https://v.shopify.com 'self' 'unsafe-inline' 'unsafe-eval'; upgrade-insecure-requests; report-uri /csp-report?_

Hey @Kristoffer_Stellini,

can you share your corresponding request or the client library you are using to make the request?

Best regards,

Kevin :hatching_chick:

For webhook creation, a 201 would be an expected response.

What I would double check here is that you are using the correct myshopify.com URL of the store (you can query the shop endpoint to confirm).

The 200 you are getting would align more with a GET request. When the incorrect URL is used for anything but a GET request, our system will default that to GET, which would explain what you are seeing here.

can be related to that the shop url I’m using is not a myshopify url but an alias?

e:g: ‘shopurl.eu’ instead of 1201.myshopify.com

Yes, definitely. POST will only work with the proper myshopify url.

It worked.
using the proper shop_domain. But is not working if I use the alias.
Thank you