tell me the endpoint or GraphQL to upload image files in a location File under Content

Solved

tell me the endpoint or GraphQL to upload image files in a location File under Content

heyuuuuu
Tourist
22 0 1

I'm trying to find out how to upload image files on Files under content using API or GraphQL.

 

I asked Claunde2 and it says;

To upload an image file to the Files section in Shopify using the REST Admin API, you would use the following endpoint:

POST /admin/api/2023-10/themes/<theme_id>/assets.json

 

But it didn't work.

Please tell me endpoint or GraphQL to do.

 

Thanks.

Screenshot 2024-01-17 22.38.48.png

Accepted Solution (1)

SBD_
Shopify Staff
1829 271 415

This is an accepted solution.

Hey @heyuuuuu 

 

You'll want to use the FileCreate mutation to add files here.

Scott | Developer Advocate @ Shopify 

View solution in original post

Reply 1 (1)

SBD_
Shopify Staff
1829 271 415

This is an accepted solution.

Hey @heyuuuuu 

 

You'll want to use the FileCreate mutation to add files here.

Scott | Developer Advocate @ Shopify