Bug Report: Persistent 404 Not Found on PUT Request to Theme Assets API

Hello Shopify Support Team,

I am an app developer building a public application and have encountered a critical bug with the Admin REST API. After many days of extensive debugging, I have confirmed that this appears to be a platform-level issue.

The Problem: I am making a standard PUT request to the themes/{theme_id}/assets.json endpoint to create a new section file. The request is consistently failing with a 404 Not Found error, even though all parameters, credentials, and scopes are correct.

Summary of Extensive Debugging: To isolate the issue, I have taken the following steps, all of which resulted in the same 404 error:

  1. Code Verification: Confirmed the API endpoint, PUT method, and request payload structure match the official REST API documentation.
  2. Local Environment: Ruled out local machine issues by successfully using both Cloudflare and ngrok tunnels.
  3. Hosting Environment: Deployed the application to a professional cloud host (Render.com) to completely eliminate any local network or tooling problems. The error persisted on the cloud server.
  4. App Configuration: To rule out a corrupted app configuration, I created a brand new app (“Shahbaz Section Library”) in my Partner Dashboard with fresh API credentials. The error persisted.
  5. Store Environment: To rule out a corrupted development store, I created a brand new development store (shahbaz-test-shop.myshopify.com) and installed the new, fresh app on it. The 404 Not Found error still persists.

Final Request Log: Here is a log of the final failed request, made from the new app on the new store, running on a Render.com server. As you can see, the request URL is perfectly formed.

--- Preparing to Add Section --- Shop Name: shahbaz-test-shop.myshopify.com API Version: 2024-10 Theme ID: 145454956700 Access Token (first 10 chars): shpua_fe4d... Final API URL: https://shahbaz-test-shop.myshopify.com/admin/api/2024-10/themes/145454956700/assets.json --- Shopify API Error --- Status: 404 Body: { "errors": "Not Found" }

Conclusion: Since this error occurs even with a brand new app on a brand new development store, running from a clean cloud environment, it proves the issue is not with my code or environment. This is a platform-level bug with the themes/{theme_id}/assets.json endpoint for my partner account.

Could you please escalate this to your engineering team for investigation?

Thank you for your help.

Hi @Learning_Place

Thanks for flagging this - the REST API is a legacy API and apps should use the GraphQL API instead. If you use the themeFilesUpsert mutation, are you seeing the same issue?