New Folder Option in File / Possible API-Access?

Hello everyone,

I just noticed that you can now also create “folders” under the files and move the images into them. This seems to be very new, because I didn’t notice it recently and didn’t find anything about it anywhere in the documentation.

One question, is it possible to upload the images “directly” to such a folder for sorting when uploading via API. That would help a lot for my personal app.

Hey @puppyspike , API access is available but it is currently available only in the unstable Admin GraphQL API.

On unstable, FileCreateInput accepts either parentDirectoryId or parentDirectoryPath. Send the request to /admin/api/unstable/graphql.json:

mutation UploadToFolder($files: [FileCreateInput!]!) {
  fileCreate(files: $files) {
    files {
      id
      name
      path
      fileStatus
    }
    userErrors {
      field
      message
      code
    }
  }
}
{
  "files": [
    {
      "contentType": "IMAGE",
      "originalSource": "https://burst.shopifycdn.com/photos/laptop-on-desk.jpg",
      "filename": "image.jpg",
      "parentDirectoryPath": "public/App uploads"
    }
  ]
}

For a local file, use its staged-upload URL as originalSource. You can use parentDirectoryId instead if you have the folder’s gid://shopify/Directory/... ID. The app needs write_files; listing folders also needs read_files.

The unstable API can also create folders with contentType: DIRECTORY and move existing files with fileUpdate. When creating a folder, set duplicateResolutionMode: RAISE_ERROR.

This isn’t available in stable 2026-10 or release candidate 2027-01. Shopify’s unstable version is for early testing and can change, so avoid relying on it in production until it appears in a named API version. No stable release date is documented yet.

Thx for your answer. Of course I didn’t look at the unstable version, but that sounds very interesting. :slight_smile: